bill wrote:
I know that the IMAP library can be used to pop mail as well, but the
php.net documentation is not very clear (by this I mean simple enough
for me to understand).
Does anyone have a link or a resource that give simple examples ?
I need to retrieve some plain text or the plain text part of a
multipart email only.
bill
Bill,
I don't know of any tutorials but in my messing around with the IMAP
functions it seemed pretty easy. The functions are pretty self
explanatory as found on
www.php.net so really try to remember the folowing:
1) connect to the mail server
2) obtain the number of messages (if needed)
3) or optionally search for a specific message
4) fetch the info you want
5) close the connection
A simple example would be:
$mailbox =
imap_open("{your.mailserver.com:110/pop3}INBOX","username","password");
$mailbox_status = imap_check($mailbox);
echo "<br>Mailbox status for {$mailbox_status->Mailbox}:<br>";
echo "System date: {$mailbox_status->Date}<br>";
echo "System driver: {$mailbox_status->Driver}<br>";
echo "Message count: {$mailbox_status->Nmsgs}<br>";
etc.
imap_close($mailbox);
---
you may be better off looking through
www.phpclasses.org and finding a
pre-made class that will do all this for you.
Norm
---