Symfony 使用Mailgun服务提供商在谷歌云上通过Swift Mailer发送电子邮件

Symfony 使用Mailgun服务提供商在谷歌云上通过Swift Mailer发送电子邮件,symfony,smtp,google-cloud-platform,mailgun,Symfony,Smtp,Google Cloud Platform,Mailgun,我有一个Symfony 3.4应用程序和FOSUserBundle安装了它。我将应用程序部署到计算引擎实例。然而,当我在每次注册后尝试发送电子邮件时,我会出现以下错误 Exception occurred while flushing email queue: Connection could not be established with host smtp.mailgun.org [Connection timed out #110] [] [] 这是我的parameters.ym

我有一个Symfony 3.4应用程序和FOSUserBundle安装了它。我将应用程序部署到计算引擎实例。然而,当我在每次注册后尝试发送电子邮件时,我会出现以下错误

 Exception occurred while flushing email queue: Connection could not be 
 established
 with host smtp.mailgun.org [Connection timed out #110] [] []
这是我的parameters.yml文件

parameters:
    mailer_transport: smtp
    mailer_host: smtp.mailgun.org
    mailer_user: postmaster@mydomain.tdl
    mailer_password: mailerpass
我也试过了

mailer_host: smtp.mailgun.org:587

我将587传出端口添加到谷歌云平台的防火墙规则列表中,但这也没有帮助

看起来在计算引擎上应该使用端口
2525
,因为不允许在端口25、465和587上进行出站连接。您可以在Mailgun和Google云平台上阅读更多信息。

在Compute Engine上,您应该使用端口
2525
,因为端口25、465和587上的出站连接是不允许的。您可以在Mailgun和Google云平台上阅读更多信息。

Google Compute Engine的所有标准发送SMTP端口都被设计屏蔽。请在此处投票以更改谷歌的SMTP行为:


在他们打开SMTP端口之前,不会有好的方式从云服务器发送电子邮件。Sendgrid和其他软件价格太高,并且缺少所需的许多功能。

谷歌计算引擎的所有标准发送SMTP端口都被设计屏蔽。请在此处投票以更改谷歌的SMTP行为:

在他们打开SMTP端口之前,不会有好的方式从云服务器发送电子邮件。Sendgrid和其他产品价格太高,并且缺少所需的许多功能