问题
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