Peter Featherstone Peter Featherstone - 1 year ago 58
PHP Question

Using imap_search with a Godaddy hosted email account?

I'm having issues with using

using a Godaddy hosted email account.

I have created a script that connects to 3 mail boxes using PHP and the
functions before looping through all the emails and retracting the specific information that I need.

It works fine with 2 other accounts, 1 hosted with gmail and the other self hosted. With the Godaddy account I don't have hosting with them they only host our emails and our website is hosted elsewhere.

I can connect fine to the mail server using
without errors, however when I use
it doesn't return any emails, I've tried changing 'UNSEEN' to 'ALL' but it is still not retrieving any emails.

The imap_open host value im using is

I don't know if anyone has had any issues with this before and while I wait for a response from GoDaddy, I know that users here are usually a lot quicker at responding and more informative so I'm asking the community here.

If I run echo commands after the
function I can see this on screen so I know it is getting that far in the script, it is just returning a blank array of emails for the

Answer Source

I have had a response from GoDaddy with the following information in case anybody else finds themselves in the same boat as me.

Thank you for contacting Online Support. Our IMAP servers do not allow connections from external servers. This is prevented within the mail server security settings and firewalls. We apologize for any inconvenience however, these settings will not modified to support imap_search(). We appreciate your understanding regarding this matter.

This is quite frustrating, however at least I have an answer. I will have to move my emails over to Google Apps or similar to get these to work with imap_open() / imap_search() on my server.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download