Page 1 of 1
Theory or process to reading a POP3 / IMAP mailbox?
Posted: Tue Nov 25, 2008 12:34 am
by peterg0123
Hi,
Can anyone tell me the process or steps (not code) to reading a mailbox and extracting the different sections / parts of a message.
I know you start with imap_open(), but not certain where to go from hear?
Re: Theory or process to reading a POP3 / IMAP mailbox?
Posted: Tue Nov 25, 2008 12:39 am
by alex.barylski
1. Connect to IMAP/POP3 account
2. Read in all messages in a mailbox
3. Iterate messages and parse their contents using imap_*
I would recommend finding an existing IMAP parsing class as the API is quite complex and confusing...I actually need to implement one myself here shortly
Re: Theory or process to reading a POP3 / IMAP mailbox?
Posted: Tue Nov 25, 2008 12:43 am
by peterg0123
Thanks, I want to create the code myself, best way to I think to learn....
Could you possible get a little be more into detail into what function I need to use?
Re: Theory or process to reading a POP3 / IMAP mailbox?
Posted: Tue Nov 25, 2008 12:48 am
by Eran
Start with imap_open() -
http://www.php.net/manual/en/function.imap-open.php and continue to the rest of the imap functions -
http://www.php.net/manual/en/ref.imap.php (as spectra mentioned).
Pay attention to the examples shown in each page. That should give you plenty to go on.