![]() $messageses = $this -> mailbox -> listMessages() 2 - MESSAGE/RFC822 (entire attached message)Īm using fMailbox class to fetch emails ,see this link for usage of fmailboxĬonfiguring fmailbox is simple mailbox = new fMailbox($emailType, $emailHost, $emailUsername, $emailPassword).Now if you attach the above email to an email with the message text in plain text and HTML, imap_fetchbody() will use this type of part number system: With an email message that is a multi-part message in MIME format, and contains the message text in plain text and HTML, and has a file.ext attachment, imap-fetchbody() will return something like the following for each requested part number: With an email message that only has a text body and does not have any mime attachments, imap-fetchbody() will return the following for each requested part number: Imap-fetchbody() will decode attached email messages inline with the rest of the email parts, however the way it works when handling attached email messages is inconsistent with the main email message. Instead of $msg = imap_fetchbody($inbox,$email_number,1.2) įound some more information on this topic on : Try $msg = imap_fetchbody($inbox,$email_number,1.1) Is there a way i make the whole message body plain text? Other times it is showing as plain text but with huge line breaks. I have added the if statements to see if the message body is base64 encoded and if it is to decode it but it still displays as above sometimes. $message = $message = imap_fetchbody($inbox, $email_number, 1) $message = imap_fetchbody($inbox, $email_number, 1.2) $structure = imap_fetchstructure($inbox,$email_number) $header=imap_headerinfo($inbox,$email_number) if emails are returned, cycle through each. $inbox = imap_open($hostname,$username,$password) or die('Cannot connect: '. I am using imap_open in PHP but the message body is showing like:
0 Comments
Leave a Reply. |