【问题标题】:Email Sent But Not Receiving with swiftMailer使用 swiftMailer 发送但未接收的电子邮件
【发布时间】:2018-01-23 15:42:16
【问题描述】:

我在 Symfony Swiftmailer 中发送邮件时遇到问题。

通过使用命令:

php 应用程序/控制台 swiftmailer:email:send

这是我的 swiftMailer.yaml

swiftmailer:

transport:            gmail
username:             "**************@*******"
password:             "****************"
host:                 smtp.gmail.com
port:                 465
encryption:           ~
auth_mode:            ~
sender_address:       ~
antiflood:
    threshold:            99
    sleep:                0
delivery_addresses:   ~
disable_delivery:     ~
logging:              true

有人知道是什么问题吗?

【问题讨论】:

  • 我试过了,它返回了([2018-01-23 09:44:43] 正在处理默认邮件后台... 1 封电子邮件已发送)但没有收到邮件
  • 那么如果你登录到 gmail 你能在 Sent Mail 文件夹中看到邮件吗?
  • 我查了,没有收到任何东西
  • 我说的是Sent Mail 不是Inbox :)
  • 另外你运行命令时不传递 env,这意味着 dev 使用 iirc。也许在您的开发配置中您启用了disable_delivery?或者delivery_address 设置为不同的?您应该使用更多代码/配置更新问题。

标签: symfony email send swiftmailer


【解决方案1】:

如果您的 Gmail 帐户使用两步验证,您必须 generate an App password 并将其用作邮件密码的值。您还必须确保您allow less secure apps to access your Gmail account

【讨论】:

  • 我检查了,两者都配置得很好
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-16
  • 1970-01-01
  • 2017-12-05
相关资源
最近更新 更多