I'm connecting via imap to an email account:
$hostname = "{imap.zoho.com:993/imap/ssl/novalidate-cert}";
$imap = imap_open($hostname, 'email', 'password');
And it works perfectly fine from XAMP on my local machine, but when I run it from my shared hosting account (host-ed.net) I get the following errors:
Warning: imap_open(): Couldn't open stream {imap.zoho.com:993/imap/ssl/novalidate-cert} in /home/****/public_html/testmail.php on line 4
Warning: imap_num_msg() expects parameter 1 to be resource, boolean given in /home/****/public_html/testmail.php on line 5
Warning: imap_close() expects parameter 1 to be resource, boolean given in /home/****/public_html/testmail.php on line 27
Any idea what could be the issue with my hosting provider that is causing this?
edit...
Added imap_errors and get this (timing out):
map_errors(): Array ( [0] => Can't connect to imap.zoho.com,993: Connection timed out )
You can try this:
imap_open("{imap.mail.eu-west-1.awsapps.com:993/imap/ssl}INBOX", "EMAIL", "PASS");
This was written for AWS WorkMail. You can check this documentation: http://php.net/manual/en/ref.imap.php
This is all that you need.