PHP Classes

Possible to handle IMAP e-mails?

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Possible to handle IMAP e-mails?  >  (Un) Subscribe thread alerts  
Subject:Possible to handle IMAP e-mails?
Summary:Trying to use this in conjunction with imap_open()
Messages:2
Author:Luke Arndt
Date:2011-02-18 04:04:31
Update:2011-02-18 04:33:28
 

  1. Possible to handle IMAP e-mails?   Reply   Report abuse  
Picture of Luke Arndt Luke Arndt - 2011-02-18 04:04:31
I apologize if this is a silly question, but can this class be used in conjunction with IMAP e-mail messages?

I use this syntax to connect to my e-mail account:

$mailbox = imap_open("{localhost:143/notls}INBOX", "[email protected]", "mypassword");

How can I use this class to parse the e-mails in the inbox?

Thank you!

- Luke

  2. Re: Possible to handle IMAP e-mails?   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-02-18 04:33:28 - In reply to message 1 from Luke Arndt
You need to retrieve the whole message with headers and body into a single string so you can pass it to the MIME parser class. Try something like this:

$message_data = imap_fetchheader($imap, $message) . "\r\n" . imap_body($imap, $message);