PHP Classes

Guidance requested

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Guidance requested  >  (Un) Subscribe thread alerts  
Subject:Guidance requested
Summary:Guidance requested
Messages:2
Author:Matthew
Date:2010-09-10 22:03:49
Update:2010-09-11 00:39:01
 

  1. Guidance requested   Reply   Report abuse  
Picture of Matthew Matthew - 2010-09-10 22:03:49
I've downloaded the class and uploaded all the files to a 'test' directory on the web server. I've looked through the files, through the documentation, and through the forum and from what I've read, it will do what I need it to, but just don't know how to proceed.

My scenario: I subscribe to website on which I'm allowed to post various items for sale (similar to ebay). On each item, there's a form that a person can fill out and submit to me if they have questions about the item (Name, email address, phone, comments, etc.). That email is received by me in consistent text format to a specific email address I designate (ex: [email protected]).

My goal is to:
1. check 'moreinfo@' email account via POP or IMAP (ex. via cron job)
2. retrieve unread email and parse the body to extract the contents (Name, email address, etc.) so I can write it to my db (mysql).
3. Mark the email as 'read'.

What steps to I need to take in order to use this class to obtain the email contents to populate the variables so I can create a new record in my db?

Thanks!
Matthew

  2. Re: Guidance requested   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2010-09-11 00:39:01 - In reply to message 1 from Matthew
You can try the POP3 class in conjunction with this. It will retrieve the message and pass it to this class as if it was a real file. Take a look at the parse_message.php example script of the POP3 class.

phpclasses.org/pop3class