Jump to content

PHP read pop3 mail account


wisewood

Recommended Posts

I'm after a quick and easy way to read the content of a pop3 mailbox. 

 

I don't need anything fancy, just a way to list the date/sender/title, and then when selected, display the content of the message.  I'd also like the mail to remain on the server to be downloaded properly into a mail client later.

 

It doesnt even need to be capable of sending email at the moment - just reading it.

 

It's so that a friend of mine can check her email online to find out her exam result next week while on holiday.

 

Thanks.

Link to comment
Share on other sites

She uses an email account that i set up for her on my domain, no webmail access to her account only, the webmail logs into the master account.

 

Can i have some help now please lol

 

I have managed to figure out enough of the IMAP stuff to get a connection established, listing the emails in the inbox, with a link to a page to display the content of the message - but i cant get my head around the imap_body / imap_fetchbody to display the message.

 

I have passed the UID from one page to another ($_GET[uid]) and that variable passes over properly - and have used imap_msgno to convert it into the message number, but still need to figure out how to display the message content.

Link to comment
Share on other sites

dont know if this helps but have you look into google apps for domains https://www.google.com/a/ or microsoft equivalent.  It allows you to offer email accounts using your domain name but without the headache of providing the infrastructure.

 

Not really what they want I'm afraid.  She's obviously expecting an email to an address that's already been given out.#

 

Regards

Huggie

Link to comment
Share on other sites

The email address has been used to register for receiving email exam results next week.  Too late to change the email address with the exam people, so needs to be set up and in place as soon as possible just so she can read the emails.

 

 

Link to comment
Share on other sites

Hey, I'm fairly new to dealing with email via PHP, but I've read you should be able to do this by using sockets:

 

http://www.phpfreaks.com/forums/index.php/topic,121742.0.html  --  mentions this

http://www.thescripts.com/forum/thread1790.html -- implements this

http://www.ietf.org/rfc/rfc1939.txt  --  the pop3 specification with all the possible header commands and what they do, etc.

 

I don't believe there are any native extensions with pop3 capabilities (though I've seen some on PHPClasses.org and in the PEAR extensions archive).

 

As for saving the messages--any database'll do.

 

Good luck!

 

EDIT:

http://www.phpclasses.org/browse/package/2.html -- one of the afformentioned phpclasses.org pop3 extensions.

Link to comment
Share on other sites

Hi,

 

From what I gather is you have setup an email address for your friend using your domain name. i.e. your_freinds_name@your_domain_name.com or something like that.  My understanding of google apps for domain is that you set up email address using your domain name but google do all the back end stuff.  So you can set up email like your friend existing email address. Though I dont know how the back end stuff is set up..Another way is to set up a google email account up under your freinds name, like yourfriendsname@googlemail.com because google email allows you to fetch email from other email accounts. 

 

"How do I set up Mail Fetcher?

 

Google Mail allows you to fetch mail from your other, non-Google Mail accounts. You'll be able to read email from up to 5 additional accounts, all in one place, and take advantage of all of Google Mail's great features. Note that the email accounts you would like to fetch will need to support POP access. Some free email services don't support POP access at this time."

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.