Re: login and read ad email

From: Date: Mon, 07 Jan 2008 04:30:52 +0000
Subject: Re: login and read ad email
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-266829@lists.php.net to get a copy of this message
Hello, on 01/05/2008 07:06 PM Yui Hiroaki said the following: > HI! > > I try to login and read ad email in server. > Does any one know how to do this? > Below does not run correctly. > > Regards, > Yui > > p.s > I try to see pop3 email. > I can not find the example! As I mentioned before POP3 is more complex than that. You are just authenticating. You need to list the messages in the mailbox and retrieve them. I suggest that you use this popular PHP POP3 client class. It works so elegantly that you can even access messages in your mailbox as if they were files, with a single line like this: $message = file_get_contents('pop3://user:password@pop3.yourdomain.com/1'); This gets you the whole message with headers into the $message variable. If you want to analyze the message to extract the relevant information, you can use the MIME parser class and with just a few more lines it will tell you if it is a text message, HTML message, extract any attachments, etc. http://www.phpclasses.org/mimeparser -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/

« previous php.general (#266829) next »