SMTP Configuration not working in Mautic

Your software
My Mautic version is: 2.16.0
My PHP version is: 7.2.28

Your problem
My problem is: SMTP connection test fails with the following error:

Failed to authenticate on SMTP server with username “trainings@letswake.com” using 2 possible authenticators
++ Starting Swift_SmtpTransport << 220-letswake.com ESMTP Exim 4.93 #2 Sat, 14 Mar 2020 14:14:02 +0530 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. >> EHLO letswake.com << 250-letswake.com Hello letswake.com [31.220.50.106] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP >> AUTH LOGIN << 334 VXNlcm5hbWU6 >> dHJhaW5pbmdzQGxldHN3YWtlLmNvbQ== << 334 UGFzc3dvcmQ6 >> U2lsa3JvdXRlIQ== << 535 Incorrect authentication data !! Expected response code 235 but got code “535”, with message "535 Incorrect authentication data " (code: 535) >> RSET << 250 Reset OK >> AUTH PLAIN dHJhaW5pbmdzQGxldHN3YWtlLmNvbQB0cmFpbmluZ3NAbGV0c3dha2UuY29tAFNpbGtyb3V0ZSE= << 535 Incorrect authentication data !! Expected response code 235 but got code “535”, with message "535 Incorrect authentication data " (code: 535) >> RSET << 250 Reset OK

These errors are showing in the log:

[2020-03-14 08:06:04] mautic.NOTICE: Swift_TransportException: Failed to authenticate on SMTP server with username “trainings@letswake.com” using 1 possible authenticators (uncaught exception) at /home/knsmanish/public_html/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php line 181 while running console command mautic:emails:send

Steps I have tried to fix the problem:

SSL is all in place, i have tried all possible combinations of SMTP configuration in the Mautic Email Configuration Window.

here is something i do when i have to be sure what settings are correct, I try adding the mail in Thunderbird and let it fetch the settings by itself this then helps me put correct settings anywhere else.

Just a trick but worked for me many time. If still doesn’t work we can look further.

Hi @mayanktiwaridotcom - let me try it real quick. Thank you for taking this up.

didn’t go through. it says either bad configuration or incorrect user name and pwd. I know the user name and pwd are correct. so there is some problem with the server.

yup looks like it, just try to get it work with any email client then use the same config with mautic will work Fine.

Don’t forget to:

  • share the solution.
  • close the ticket, when it works.

This is not guaranteed to solve the problem, but Mautic us not a client, it’s a server. You will need to get an MX record set up to authorise Mautic. Even if the current problem is fixed, your emails may never get delivered without the correct Mx config.

@edward1 - my setup is running on a VPS, so anything you say can be created. Is there a place i can find detailed instructions for what needs to be done? I am running cPanel on CentOS VPS and Mautic from the same server.