# Email in campaign can't be sent

**URL:** <https://forum.mautic.org/t/email-in-campaign-cant-be-sent/11987>\
**Category:** Product Support\
**Created:** [December 11, 2019, 9:21pm UTC](https://forum.mautic.org/t/email-in-campaign-cant-be-sent/11987 "2019-12-11T21:21:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ameli\_fr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ameli_fr/32/580_2.png) [@ameli\_fr](https://forum.mautic.org/u/ameli_fr)\
**Post date:** [December 11, 2019, 9:21pm UTC](https://forum.mautic.org/t/email-in-campaign-cant-be-sent/11987/1 "2019-12-11T21:21:46Z")

</div>

**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](mailto: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](http://smtp.gmail.com) [Connection refused #111] Log data: ++ Starting Swift\_Transport\_EsmtpTransport !! Connection could not be established with host [smtp.gmail.com](http://smtp.gmail.com) [Connection refused #111] (code: 0) (send); [email@gmail.com](mailto:email@gmail.com) {“exception”:"[object] (Swift\_TransportException(code: 0): Connection could not be established with host [smtp.gmail.com](http://smtp.gmail.com) [Connection refused #111]\nLog data:\n++ Starting Swift\_Transport\_EsmtpTransport\n!! Connection could not be established with host [smtp.gmail.com](http://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

---

<div class="post-metadata">

**Author:** ![MxyzptlkFishStix](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mxyzptlkfishstix/32/1132_2.png) [@MxyzptlkFishStix](https://forum.mautic.org/u/MxyzptlkFishStix)\
**Post date:** [December 12, 2019, 2:40pm UTC](https://forum.mautic.org/t/email-in-campaign-cant-be-sent/11987/2 "2019-12-12T14:40:58Z")

</div>

Contact you hoster and get your outbound SMTP ports unblocked.

---

<div class="post-metadata">

**Author:** ![ameli\_fr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ameli_fr/32/580_2.png) [@ameli\_fr](https://forum.mautic.org/u/ameli_fr)\
**Post date:** [December 12, 2019, 4:08pm UTC](https://forum.mautic.org/t/email-in-campaign-cant-be-sent/11987/3 "2019-12-12T16:08:09Z")

</div>

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.
