Accessing local mailbox using PHP on a shared hosting Linux account (GoDaddy)
I guess it should be a common technique, However, I tried the following two options:
1) Using my existing POP3 PHP client to access my local mail account. I am getting a "could not connect". Same code works if I run it with my localhost connecting to GoDaddy's pop3 server
2) Parsing the local mbox file - I can't figure out if I can access it, seems like I can't.
Any good ideas of which approach should be best here?
I'd go with the POP3 option. It should work once you get the right port/host etc.
The other option will result in you duplicating a large part of the functionality already in the mail server, and its quite likely you'll have minor bugs in it resulting in emails not displaying properly, or worse, corruption in the mbox.
If you do go with 2, try to find a library for doing the mbox bit!
Zend Framework has a mail component, that allows you to read from various sources.
Seems like I have this figured out. Shared hosting (GoDaddy specifically) does not allow direct TCP connections anywhere, including their own POP3 server. Looks like I can't be able to access the mbox file directly either. So I figure it is just not going to work.
Thanks all repliers!
Maybe there are OTHER inexpensive shared hosting plans that provide this option...