0
我正在开发一个symfony 2.2项目站点,我在其中使用swift邮件发送邮件; 在Parameter.yml,配置如下:Symfony2.2 Swiftmailer无法在AWS-EC2服务器上工作服务器站点
database_driver: pdo_mysql
database_host: localhost
database_port: null
database_name: My_Project_Name
database_user: username
database_password: userpass
mailer_transport: gmail
mailer_host: smtp.gmail.com
mailer_encryption: ssl
mailer_auth_mode: login
mailer_user: [email protected]
mailer_password: my_gmail_account_password
locale: en
secret: my_secret
database_path: null
,我的邮件程序如下:
$message = \Swift_Message::newInstance()
->setSubject("Subject_description")
->setFrom("[email protected]")
->setTo("[email protected]")
->setBody("message_body");
$this->mailer->send($message);
它的工作完全在本地主机,但在项目工地现场是AWS-EC2服务器上,它没有给出任何错误并给出关于完全发送邮件的成功通知消息,但实际上没有在[email protected]上收到电子邮件。我不知道我的配置有什么问题吗?
如果任何机构有关于这个问题的想法,请让我知道,这将非常感激!
您是否试过检查邮件的垃圾邮件文件夹? Aws IP通常被列入黑名单 – alex88