0

I am using

$body_msg = imap_utf8(imap_qprint(imap_fetchbody($inbox,$mail, 1.2))); 

to fetch my html emails in codeigniter in a formatted way .

Issue I am facing is :

I get some mimepart below the body of the email .

For example - For an email I got -

----==_mimepart_579ff252a2fa2_7eceacb00c2643b-- 

below the email signatures used in the email , How should I filter / get rid of this content .

Dekel
  • 60,707
  • 10
  • 101
  • 129
  • try using a full on email parser class instead of the imap functions. ive had good luck with this: https://pear.php.net/package/Mail_Mime also check out http://stackoverflow.com/questions/4721410/best-way-to-handle-email-parsing-decoding-in-php – chiliNUT Aug 02 '16 at 02:55
  • Thank You mate for the prompt reply , I will try the above . Thank You – Ritika Arora Aug 02 '16 at 10:02

1 Answers1

0

I could resolve the error , referring the below urls :

http://kb.mozillazine.org/Entire_message_fetched_when_opening_a_IMAP_message

Parsing Email Body with 7BIT Content-Transfer-Encoding - PHP

Community
  • 1
  • 1