ajones

HTML rewriting filters generate incorrect messages from plain text emails with attachments

HTML rewriting filters (seen with clicktrack, opentrack) generate incorrect content when handling emails with attachments through Rails.

Steps to reproduce:
1. Within rails, create a mailer with a text-only template that includes file attachments (my use case had 3 csv files)
2. Send a message through that mailer with the opentrack or clicktrack apps enabled
3. The message will appear to have the text inserted twice. Order seems to be:

Normal text/plain message part
Attachment message parts
SendGrid's generated HTML message part

It looks like this should be rewritten into a multipart/alternative that contains the original text document and the sendgrid-generated document as parts.

Have confirmed that this shows as multiple copies of the same content in GMail and the iPhone mail client. Did not take the time to confirm it in other clients, but a quick look at the message organization suggests it will be a similar issue there.

I have not checked to see how this situation is handled when using Rails to generate a multipart/alternative message that includes by html and text versions of the content.
1 person has
this problem
+1
Reply