0

I am using imap_fetchbody to retrieve email body. I need the returned stream in html format to manipulate the DOM table included in the message. For messages with attachments, this is easily done with setting the option to 1.2 that will return body in TEXT/HTML format. However for emails without attachments, I can't find a way to get the content in html format. Setting the option to 1 will simply return plain text.

thethakuri
  • 509
  • 5
  • 16
  • Possible duplicate of [Downloading attachments to directory with IMAP in PHP, randomly works](http://stackoverflow.com/questions/2649579/downloading-attachments-to-directory-with-imap-in-php-randomly-works) – Dekel Oct 26 '16 at 17:23

1 Answers1

0

I was able to do it by setting the option to 2.

thethakuri
  • 509
  • 5
  • 16