Laravel - Failed to authenticate on SMTP server with .. using 2 possible authenticators

↘锁芯ラ 提交于 2019-12-11 07:31:10

问题


I saw this questions were asked many times. I tried many of them and nothing working. I am using laravel and mailgun api to send email.

I am geting this error Failed to authenticate on SMTP server with username "postmaster@noreplay.padelmatch.se" using 2 possible authenticators and also in my dedicated server log I get

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

I also created a email account with same name (email@sub.subdomain.com) but still doesn't work.

In my .env file I have a set up like this

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

Any idea how can I solve it?

Thank you.


回答1:


I solved it. Actually it was a stupid thing. Since I was using mailgun so I don't need to use smpt as it is causing the issue. So in mail driver, I used MAIL_DRIVER=mailgun and that's the solution for my case :). Hope it helps some lonely googler....



来源:https://stackoverflow.com/questions/50613906/laravel-failed-to-authenticate-on-smtp-server-with-using-2-possible-authent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!