Inside the function, we call the getpart () function with the content type as TEXT/HTML. $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to : '. The getBody () function gets the email’s content by passing its UID and the IMAP connection. In most cases, this is done using the Internet Message Access Protocol, or IMAP.As a PHP developer, I first turned to PHP’s built in IMAP library, but this library is buggy and impossible to debug or modify. The script has been tested on emails sent from Gmail, Outlook, Yahoo, Apple Mail, Mozilla Thunderbird, and others. Developers sometimes run into tasks that require access to email mailboxes. Here is the code which i have tried include('imap.php') PHP IMAP Fetcher is an open source PHP script that can fetch or pipe emails from a POP box, save the message to MySQL (both text-plain and text-html), and save attachments/images locally. This is a recursive function which creates an array indexed by the part number (1, 1.1, 1.2 etc) and follows the IMAP RFC rules. After running the code all plain text mails remains as unread and html mails marked as read and the other things like sender mail id and subject i can read.Only the problem is with reading the content. I am reading mails from a specific mail id using IMAP function.But i am not able to read the mail content for plain text mails.
0 Comments
Leave a Reply. |