PDA

View Full Version : using curl to fetch pop3 mail


stevebramley
04-09-2009, 01:07 PM
Hey folks,

I've got a problem where I used to use fsockopen to poll an email account to check mail. The current host has closed off all external ports and want me to use their proxy via curl. Has anyone had any experience getting php to talk to a mailserver via curl?

::Scott::
04-09-2009, 08:06 PM
Might be a little complex for what its worth with just CURL. Do you know that their proxy will even handle POP?

Id suggest a library like http://pear.php.net/package/Net_POP3/.
If not, changing hosts might save you a lot of time.

stevebramley
07-09-2009, 09:14 AM
HI Scott,
Thanks for that. I did some testing after I posted here and cURL doesn't support tcp:// which is what's needed to do the call to the mail server. I did notice an example where someone used a proxy in fsockopen but we're getting into 'more complicated than quoted for' territory. no option to use pear or change host i'm afraid.

Steve