php - Get the text of multipart Gmail messages -
i trying fetch emails gmail php using imap. i'm getting emails problem of messages in multipart format, , remove multipart format.
for example, 1 gmail message "hi, how you? fine", message has text this:
"hi, how you? fine ------=_nextpart_000_000b_01ce5613.4a5d9f20 // multipart format content-type: text/html; // multipart format charset="us-ascii" // multipart format content-transfer-encoding: quoted-printable". // multipart format
hi try this,
$mailnumber = '11796'; $result = $mailbox->getmessagecontent($mailnumber); if ($result->texthtml) echo '<br>'.$result->texthtml; else echo '<br>'.$result->textplain;
Comments
Post a Comment