# Constant connection could not be established

**URL:** https://forum.mautic.org/t/constant-connection-could-not-be-established/9652
**Category:** Product Support
**Created:** [October 7, 2017, 11:55am UTC](https://forum.mautic.org/t/constant-connection-could-not-be-established/9652 "2017-10-07T11:55:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![incworks](https://avatars.discourse-cdn.com/v4/letter/i/e495f1/32.png) [@incworks](https://forum.mautic.org/u/incworks)
#### Post date: [October 7, 2017, 11:55am UTC](https://forum.mautic.org/t/constant-connection-could-not-be-established/9652/1 "2017-10-07T11:55:38Z")

</div>

I’ve tried setting up the email with Amazon web service SES as well as smtp elasticemail but keep getting the below error:  
  
  
  
**Connection could not be established with host [smtp.elasticemail.com](http://smtp.elasticemail.com) [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportElasticemailTransport**  
  
   
  
  
  
I checked the error log which shows:  
  
  
  
**PHP Notice: Undefined index: {[md-in-74.webhostbox.net:993/imap/ssl](http://md-in-74.webhostbox.net:993/imap/ssl)} in /home/xpricioj/public\_html/ma/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php on line 498**  
  
   
  
  
  
I checked the mailbox.php line 498 error :  
  
**480 {**  
  
**481 static $folders = [];**  
  
**482**  
  
**483 if (!isset($folders[$this-\>imapFullPath]) && $this-\>isConfigured()) {**  
  
**484 $tempFolders = @imap\_list($this-\>getImapStream(), $this-\>imapPath, ‘\*’);**  
  
**485**  
  
**486 if (!empty($tempFolders)) {**  
  
**487 foreach ($tempFolders as $key =\> $folder) {**  
  
**488 $folder = str\_replace($this-\>imapPath, ‘’, imap\_utf8($folder));**  
  
**489 $tempFolders[$key] = $folder;**  
  
**490 }**  
  
**491 } else {**  
  
**492 $tempFolders = [];**  
  
**493 }**  
  
**494**  
  
**495 $folders[$this-\>imapFullPath] = $tempFolders;**  
  
**496 }**  
  
**497**  
  
**498 return $folders[$this-\>imapFullPath];**  
  
**499 }**  
  
   
  
  
  
I’ve hostgator multidomain plan. I’ve installed mautic through Softaculous panel for one of the hosted website. The mails individually are running fine but setting up mautic with Amazon Web Service SES or Elastic Email shows error. I’ve contacted them but they are also unable to resolve it. Even I contacted Amazon Web Service SES support and Elastic Email for the same, but none are able to resolve it.  
  
  
  
I’ve tired most of the permutation combinations discussed in the forum - changing the TLS settings/ ports/ re-installing etc but no result.  
  
  
  
Kindly suggest.

---

<div class="post-metadata">

### Author: ![incworks](https://avatars.discourse-cdn.com/v4/letter/i/e495f1/32.png) [@incworks](https://forum.mautic.org/u/incworks)
#### Post date: [October 7, 2017, 11:55am UTC](https://forum.mautic.org/t/constant-connection-could-not-be-established/9652/2 "2017-10-07T11:55:38Z")

</div>

I’ve tried setting up the email with Amazon web service SES as well as smtp elasticemail but keep getting the below error:

Connection could not be established with host [smtp.elasticemail.com](http://smtp.elasticemail.com) [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportElasticemailTransport

I checked the error log which shows:

PHP Notice: Undefined index: {[md-in-74.webhostbox.net:993/imap/ssl](http://md-in-74.webhostbox.net:993/imap/ssl)} in /home/xpricioj/public\_html/ma/app/bundles/EmailBundle/MonitoredEmail/Mailbox.php on line 498

I checked the mailbox.php line 498 error :  
480 {  
481 static $folders = [];  
482  
483 if (!isset($folders[$this-\>imapFullPath]) && $this-\>isConfigured()) {  
484 $tempFolders = @imap\_list($this-\>getImapStream(), $this-\>imapPath, ‘\*’);  
485  
486 if (!empty($tempFolders)) {  
487 foreach ($tempFolders as $key =\> $folder) {  
488 $folder = str\_replace($this-\>imapPath, ‘’, imap\_utf8($folder));  
489 $tempFolders[$key] = $folder;  
490 }  
491 } else {  
492 $tempFolders = [];  
493 }  
494  
495 $folders[$this-\>imapFullPath] = $tempFolders;  
496 }  
497  
498 return $folders[$this-\>imapFullPath];  
499 }

I’ve hostgator multidomain plan. I’ve installed mautic through Softaculous panel for one of the hosted website. The mails individually are running fine but setting up mautic with Amazon Web Service SES or Elastic Email shows error. I’ve contacted them but they are also unable to resolve it. Even I contacted Amazon Web Service SES support and Elastic Email for the same, but none are able to resolve it.

I’ve tired most of the permutation combinations discussed in the forum - changing the TLS settings/ ports/ re-installing etc but no result.

Kindly suggest.

---

<div class="post-metadata">

### Author: ![fususu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/fususu/32/215_2.png) [@fususu](https://forum.mautic.org/u/fususu)
#### Post date: [October 8, 2017, 3:15pm UTC](https://forum.mautic.org/t/constant-connection-could-not-be-established/9652/3 "2017-10-08T15:15:34Z")

</div>

If you use Elasticemail, I suggest port 587, login with your api key as both username & password 🙂
