# How to setup gmail to be used with mautic

**URL:** <https://forum.mautic.org/t/how-to-setup-gmail-to-be-used-with-mautic/32161>\
**Category:** Product Support\
**Created:** [May 25, 2024, 6:47pm UTC](https://forum.mautic.org/t/how-to-setup-gmail-to-be-used-with-mautic/32161 "2024-05-25T18:47:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncmon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ncmon/32/11887_2.png) [@ncmon](https://forum.mautic.org/u/ncmon)\
**Post date:** [May 25, 2024, 6:47pm UTC](https://forum.mautic.org/t/how-to-setup-gmail-to-be-used-with-mautic/32161/1 "2024-05-25T18:47:45Z")

</div>

**Your software**  
My Mautic version is: 5.04  
My PHP version is: 8.1  
My Database type and version is: mariadb

**Your problem**  
My problem is: i can’t setup gmail in mautic

These errors are showing in the log: Connection could not be established with host “[smtp.google.com:587](http://smtp.google.com:587)”: stream\_socket\_client(): Unable to connect to [smtp.google.com:587](http://smtp.google.com:587) (Connection timed out)

Steps I have tried to fix the problem:

(smtp://email@gmail.com:SECRET@smtp.google.com:587)

i have set an app password in google account and put it in Email DSN settings;  
i’ve also tried with regular password but the same happens;

any idea? for what i’ve searched here it is supose to be straight forward…

---

<div class="post-metadata">

**Author:** ![peter\_k](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/peter_k/32/511_2.png) [@peter\_k](https://forum.mautic.org/u/peter_k)\
**Post date:** [May 28, 2024, 11:59am UTC](https://forum.mautic.org/t/how-to-setup-gmail-to-be-used-with-mautic/32161/2 "2024-05-28T11:59:44Z")

</div>

Port 587 seems to cause issues with php mailers.

I have an instance running with Gmail as mailer. I documented the set-up:

> **[How to Send Emails with Mautic and Gmail](https://audienture.com/how-to-send-emails-with-mautic-and-gmail/)**
>
> Starting with Mautic can be overwhelming, especially because you need to pick an email service provider that will send your emails. Which to choose?
> 
> Well, I can understand if you might be hesitant to jump straight into a third-party email service...

---

<div class="post-metadata">

**Author:** ![ncmon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ncmon/32/11887_2.png) [@ncmon](https://forum.mautic.org/u/ncmon)\
**Post date:** [May 28, 2024, 12:21pm UTC](https://forum.mautic.org/t/how-to-setup-gmail-to-be-used-with-mautic/32161/3 "2024-05-28T12:21:02Z")

</div>

Thank you!
