# Email send using Office 365 and GoDaddy hosting

**URL:** <https://forum.mautic.org/t/email-send-using-office-365-and-godaddy-hosting/6919>\
**Category:** Product Support\
**Created:** [December 20, 2016, 8:40pm UTC](https://forum.mautic.org/t/email-send-using-office-365-and-godaddy-hosting/6919 "2016-12-20T20:40:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbendigiri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gbendigiri/32/935_2.png) [@gbendigiri](https://forum.mautic.org/u/gbendigiri)\
**Post date:** [December 20, 2016, 8:40pm UTC](https://forum.mautic.org/t/email-send-using-office-365-and-godaddy-hosting/6919/1 "2016-12-20T20:40:04Z")

</div>

Hi,  
  
  
  
I have installed Mautic on GoDaddy - shared hosting. Cron Jobs are also working fine. For email we are using Office 365. However, when I try to configure the email settings - Host - [smtp.office365.com](http://smtp.office365.com), Port - 587, Encry - TLS and Auth - Login, when I click on Test connection, it gives the following error -  
  
_Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] Log data: ++ Starting Swift\_SmtpTransport !! Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] (code: 0)_  
  
_++ Starting Swift\_SmtpTransport !! Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] (code: 0)_  
  
  
  
I spoke to Godaddy and they suggested to change the Host to [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net), Port 25, Encry - None. But still I get the following error -  
  
_Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] Log data: ++ Starting Swift\_SmtpTransport !! Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] (code: 0)_  
  
_++ Starting Swift\_SmtpTransport !! Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] (code: 0)_  
  
  
  
The log file in Systems info gives the following details, very similar errors for both these.  
  
  
  
mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291  
  
mautic.ERROR: Warning: stream\_socket\_client(): unable to connect to tcp://smtp.office365.com:587 (Connection refused) - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267  
  
mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291  
  
mautic.ERROR: Warning: stream\_socket\_client(): unable to connect to [relay-hosting.secureserver.net:25](http://relay-hosting.secureserver.net:25) (Connection refused) - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267  
  
  
  
  
  
GoDaddy support mentioned that the form email is working fine and this should be issue with the app. Can anyone in Mautic Support please help me with this issue?  
  
  
  
Thanks,  
  
Girish

---

<div class="post-metadata">

**Author:** ![gbendigiri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gbendigiri/32/935_2.png) [@gbendigiri](https://forum.mautic.org/u/gbendigiri)\
**Post date:** [December 20, 2016, 8:40pm UTC](https://forum.mautic.org/t/email-send-using-office-365-and-godaddy-hosting/6919/2 "2016-12-20T20:40:04Z")

</div>

Hi,

I have installed Mautic on GoDaddy - shared hosting. Cron Jobs are also working fine. For email we are using Office 365. However, when I try to configure the email settings - Host - [smtp.office365.com](http://smtp.office365.com), Port - 587, Encry - TLS and Auth - Login, when I click on Test connection, it gives the following error -  
Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] Log data: ++ Starting Swift\_SmtpTransport !! Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] (code: 0)  
++ Starting Swift\_SmtpTransport !! Connection could not be established with host [smtp.office365.com](http://smtp.office365.com) [Connection refused #111] (code: 0)

I spoke to Godaddy and they suggested to change the Host to [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net), Port 25, Encry - None. But still I get the following error -  
Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] Log data: ++ Starting Swift\_SmtpTransport !! Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] (code: 0)  
++ Starting Swift\_SmtpTransport !! Connection could not be established with host [relay-hosting.secureserver.net](http://relay-hosting.secureserver.net) [Connection refused #111] (code: 0)

The log file in Systems info gives the following details, very similar errors for both these.

mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291  
mautic.ERROR: Warning: stream\_socket\_client(): unable to connect to tcp://smtp.office365.com:587 (Connection refused) - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267  
mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291  
mautic.ERROR: Warning: stream\_socket\_client(): unable to connect to [relay-hosting.secureserver.net:25](http://relay-hosting.secureserver.net:25) (Connection refused) - in file /home/augentia99/public\_html/mcloud/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267

GoDaddy support mentioned that the form email is working fine and this should be issue with the app. Can anyone in Mautic Support please help me with this issue?

Thanks,  
Girish
