【发布时间】:2018-05-30 21:57:26
【问题描述】:
我看到这个问题被问了很多次。我尝试了很多,但没有任何效果。我正在使用 laravel 和 mailgun api 发送电子邮件。
我收到此错误Failed to authenticate on SMTP server with username "postmaster@noreplay.padelmatch.se" using 2 possible authenticators 并且在我的专用服务器日志中我也收到了
2018-05-30 13:37:32 dovecot_login authenticator failed for
(domain.com) [198.20.114.174]:40412: 535 Incorrect authentication
data (set_id=email@sub.subdomain.com)
2018-05-30 13:37:38 SMTP connection from (domain.com)
[198.20.114.174]:40412 lost
我还创建了一个同名的电子邮件帐户 (email@sub.subdomain.com),但仍然无法使用。
在我的 .env 文件中,我有这样的设置
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=25
MAIL_USERNAME=email@sub.domain.com
MAIL_PASSWORD=xxxxxxx
MAILGUN_SECRET=xxxxxxx
MAILGUN_DOMAIN=sub.domain.com
MAIL_ENCRYPTION=null
知道如何解决吗?
谢谢。
【问题讨论】:
-
我在mailgun中使用了587端口...你使用https连接吗?
-
没有。只有http连接
标签: laravel laravel-5 swiftmailer mailgun