Hey all,
I'm having trouble getting Mandrill to fill the body of my email into a template when sending through SMTP.
Per the docs (
http://help.mandrill.com/entries/21688056-using-smtp-headers-to-customize-your-messages#templates) on the X-MC-Template header, I have a template called "Sample":
Begin
<div mc:edit="main">
This should get replaced
</div>
End
Sending an email through my Rails app shows this in the logs (note the X-MC-Template header):
Subject: Sample email with template: Sample
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
X-MC-Template: Sample
Sample email body.
This results in the following email:
Begin
End
Where did the "Sample email body" text go? Wasn't it supposed to get filled in to mc:edit="main"? Choosing 'show original' shows the following (headers omitted):
--_av-fa636a12-4996-423c-ad0c-e6ce260ad7dc
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Sample email body.
--_av-fa636a12-4996-423c-ad0c-e6ce260ad7dc
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
Begin
<div></div>
End<img src="http://mandrillapp.com/track/open.php?u=10518691&id=93367431e5ca4bcf9db301fc7fd7493d&tags=1084829,1108569,1109821" height="1" width="1">
--_av-fa636a12-4996-423c-ad0c-e6ce260ad7dc--
The body of my email made it into the text version, but why not the html?
I've tried X-MC-Template: Sample, Sample|main, and other block names to no avail. Any idea what's going on?
Thanks!
-Gordon