小编Vid*_*Vid的帖子

Gmail SMTP无法在ec2实例中使用

我正在使用基于Ubuntu的ec2实例,最近我已将我的代码转移到aws上,似乎电子邮件功能无效.我在下面使用gmail SMTP服务是我的代码

'Smtpmail'=>array(
        'class'=>'application.extensions.smtpmail.PHPMailer',
        'Host'=>"smtp.gmail.com",
        'Username'=>'username',
        'Password'=>'password',
    'From'=>'from addr', 
    'setForm'=>'from name',
        'Mailer'=>'smtp',
    'SMTPSecure'=>'tls',
        'Port'=>25,
        'SMTPAuth'=>true, 
    ),

this code is working on my unix based server but on aws it is giving below error
Run Code Online (Sandbox Code Playgroud)

邮件程序错误:以下发件人地址失败:test@email.com:MAIL未被服务器接受,530,5.5.1需要验证.如需了解更多信息,请访问530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 y6sm27370508qen.21 - gsmtp

请帮忙

php smtp amazon-ec2 amazon-web-services

3
推荐指数
2
解决办法
2万
查看次数

标签 统计

amazon-ec2 ×1

amazon-web-services ×1

php ×1

smtp ×1