title: Outlook Sent Emails Can't Be Read By PHP
body: <p>I am hoping someone in the SO Community can help me solve an issue we've been unable to resolve.</p>
  <p>So we've got a postfix SMTP gateway which pipes emails to a PHP file instead of sending them out.
  This file should then read the contents of the email, Add the disclaimer on the email and pass the mail out.
  We've been unable though to get the formatting from emails sent via outlook.</p>
  <p>As it seems outlook sends mail with XML tags aswell as HTML and the parser's we've tried are unable to parse this...</p>
  <p>Is there a better class to use for universal mail parsing?
  Should we use another language than PHP to get past this issue easier?
  Or is there actually a way to get this working?</p>
  <p>The class is <a href="https://github.com/php-mime-mail-parser/php-mime-mail-parser" rel="nofollow noreferrer">https://github.com/php-mime-mail-parser/php-mime-mail-parser</a></p>
  <p>Our code is:</p>
  <pre><code>$path = __DIR__.'/savedmail.msg';
  
  $parser = new PhpMimeMailParser\Parser();
  $parser-&gt;setPath($path); 
  
  $body = $parser-&gt;getMessageBody('html');
  </code></pre>
  <p>The problem is that <code>$body = $parser-&gt;getMessageBody('html');</code> returns nothing, while <code>$body = $parser-&gt;getMessageBody('text');</code> would return the text, but completely unformated.</p>
  <p>I basically just would like to add something right before the  tag at the end of the email.
  How we do it is irrelevant, Does anyone have a suggestion which might help alleviate our problem?</p>