Failed to authenticate on SMTP server with username

Your software
My Mautic version is: 5
My PHP version is: 8.1
My Database type and version is:
mariadb
Your problem
My problem is:

Having used the right SMTP credentials and tested all ports, I am getting

Failed to authenticate on SMTP server with username "apikey" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 Authentication failed: The provided authorization grant is invalid, expired, or revoked".". Authenticator "PLAIN" returned "Expected response code "235" but got empty code.".

Manually testing the same credentials using swaks on the commandline works.

swaks --to *@*.net --from *@*.me --server smtp.sendgrid.net --auth LOGIN --auth-user apikey --auth-password '*'

Steps I have tried to fix the problem:

I verified credentials and ports many times. They work.

1 Like

And of course I found the issue right after writing.

There is a small lock icon set as a placehalder. Make sure you detele it before you paste your key.

3 Likes

THANKS! Can you believe that I spent 8 days on this without finding the issue?! I thought that the lock icon was NOT part of the password field, so I was not even trying to remove it.

That should be a BUG !! Thanks for pointing it out!! :slight_smile:

Yes. Please report it on GitHub so that someone can amend the UI.

I’m having the same issue with Sendgrid on Mautic 5! Manually testing works with swaks, but Mautic fails to authenticate. Did you find a solution?

I did have the same problem and delete the icon in the password field and works perfect. Thank you very much for this comment.

Apaguei o ícone de cadeado no campo da senha e… funcionou!!!

You are my day savior, you save my days, Thanks a lot :heartbeat: