Hkm Sadek
Hkm Sadek

Reputation: 3209

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

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 "[email protected]" 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 ([email protected])

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 protected]) 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
[email protected]
MAIL_PASSWORD=xxxxxxx
MAILGUN_SECRET=xxxxxxx
MAILGUN_DOMAIN=sub.domain.com
MAIL_ENCRYPTION=null

Any idea how can I solve it?

Thank you.

Upvotes: 1

Views: 6420

Answers (1)

Hkm Sadek
Hkm Sadek

Reputation: 3209

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....

Upvotes: 3

Related Questions