Email in campaign can't be sent

Your software
My Mautic version is:
My PHP version is: 7.1

Your problem
My problem is:

When a new user is add to a campaign, Mautic is unable ti send him a email. I have tried several SMTP (PHP, Gmail, Sengrid) but I always have a notification “Failed to execute campaign event to email@gmail.com

On the configuration page, when I send an test email, it’s working.

These errors are showing in the log:

[2019-12-11 20:44:44] mautic.ERROR: [MAIL ERROR] Connection could not be established with host smtp.gmail.com [Connection refused #111] Log data: ++ Starting Swift_Transport_EsmtpTransport !! Connection could not be established with host smtp.gmail.com [Connection refused #111] (code: 0) (send); email@gmail.com {“exception”:"[object] (Swift_TransportException(code: 0): Connection could not be established with host smtp.gmail.com [Connection refused #111]\nLog data:\n++ Starting Swift_Transport_EsmtpTransport\n!! Connection could not be established with host smtp.gmail.com [Connection refused #111] (code: 0) at /home/serveur/mautic/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php:140)"}

Steps I have tried to fix the problem:

  • several SMTP
  • recreate campaign
  • recreate email
  • add and remoove email
  • find a patch

Contact you hoster and get your outbound SMTP ports unblocked.

Hi,

Thanks MxyzptlkFishStix for your reply.

I enable “Less secure apps” (third-party mail clients) in the Gmail account from:
"MyAccount" > “Sign-in & security” > “Connected apps & sites” > "Allow less secure apps"

The strang thing is the “mail test” is working…

Thanks for your help.