juriansluiman/SlmMail — pull request #66 by shevron (2014-02-12 15:19:38+00:00)
Title: Bugfix: message sent as encoded garbage (Mandrill)

If a Zend\Mail\Message is sent through the Mandrill service, and it contains HTML/text MIME parts which are encoded using either base64 or Quoted-Printable (which is often a good idea when using traditional SMTP), the message is received in its encoded form. This is because `$part->getContent()` returns an encoded version of the content.

The solution that worked for me was to switch to `$part->getRawContent()`. I'm not sure it is "best" and that it will not break other services (I can only test with Mandrill), but as I said it makes sense to me.

I specifically refer to a message that was created like this, for example:

$body = new MimeMessage();
$bodyText = new MimePart($text);
$bodyText->charset = 'utf8';
$bodyText->encoding = Mime::ENCODING_BASE64;
$bodyText->type = Mime::TYPE_TEXT;
$body->addPart($bodyText);

I think this is important because it allows the same messages to be sent either through traditional mail transport or through a SlmMail service.