Gmail的SMTP是不工作的EC2实例 [英] Gmail SMTP is not working in ec2 instance

查看:519
本文介绍了Gmail的SMTP是不工作的EC2实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ubuntu的基于EC2实例,最近我已经改变我的code在AWS上,它似乎电子邮件功能不能正常工作。我使用Gmail SMTP服务 下面是我的code

 'Smtpmail'=>阵列(
        类=>application.extensions.smtpmail.PHPMailer,
        '主机'=>中smtp.gmail.com,
        用户名=>用户名,
        密码=>'密码',
    从'=>从地址,
    从名称';'setForm'=&GT
        梅勒'=>SMTP,
    SMTPSecure'=>TLS,
        '端口'=> 25,
        SMTPAUTH'=>如此,
    ),

这code正在我的基于UNIX的服务器上,但在AWS上它给下面的错误
 

梅勒错误:下面的发件人地址失败:test@email.com:MAIL无法从服务器接受,530,5.5.1需要身份验证。了解更多信息,530 5.5.1 http://support.google.com/邮件/斌/ answer.py回答=​​ 14257 y6sm27370508qen.21 - gsmtp

请帮忙

解决方案
  

邮件无法从服务器接受

由于垃圾邮件滥用的人使用EC2实例是历来被发送,几乎所有流行的邮件提供商的的从EC2实例在收到电子邮件。电子邮件和防垃圾邮件措施的世界是部分技术,部分政治。出于这个原因,AWS提供亚马逊简单电子邮件服务。

AWS适用于邮箱提供商,以确保所使用的SES节点已经被列入白名单,因为我们做正确的授权/认证的前期。

在这种情况下,能够从一台服务器发送电子邮件,但没有AWS是,在所有的可能性,因为EC2的IP范围内被列入黑名单由谷歌。

  

要求验证

如果同一用户名/密码在其他地方工作没有改变,我不知道该说些什么。我知道,很多很多的邮件流量不再使用端口 25 ,转而选择 587 非SSL和 465 的SSL。这就是我想要开始戳找到一个解决方案第一的位置。

i am using Ubuntu based ec2 instance, recently i have shifted my code on aws and it seemed email functionality is not working. I am using gmail SMTP service below is my code

'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

Mailer Error: The following From address failed: test@email.com : MAIL not accepted from server,530,5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 y6sm27370508qen.21 - gsmtp

Please help

解决方案

MAIL not accepted from server

Because of the spam abuse that has historically been sent from people using EC2 instances, virtually ALL popular mail providers block the receipt of email from EC2 instances. The world of email and anti-spam measures is part-technical, part-political. For this reason, AWS offers Amazon Simple Email Service.

AWS works with mail providers to ensure that the nodes used by SES have been whitelisted because we do proper authorization/verification up-front.

In this case, the ability to send email from one server but not AWS is, in all likelihood, due to EC2's IP range being blacklisted by Google.

Authentication Required

If the same user/pass works elsewhere without changes, I'm not sure what to say. I know that lots and lots of mail traffic no longer uses port 25, opting instead for 587 for non-SSL and 465 for SSL. That's the first place I'd start poking to find a solution.

这篇关于Gmail的SMTP是不工作的EC2实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆