From 95080bfeb9ab48351cdef820b641ca450bda24ad Mon Sep 17 00:00:00 2001 From: Mike Edmunds Date: Fri, 13 Dec 2019 12:49:00 -0800 Subject: [PATCH] SendGrid: document text attachment charset bug Document SendGrid's unpredictable behavior around forcing `charset="iso-8859-1"` into text attachments. (Since it seems to be happening again.) See #150 for details. --- docs/esps/sendgrid.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/esps/sendgrid.rst b/docs/esps/sendgrid.rst index 482ff5f..5469fa5 100644 --- a/docs/esps/sendgrid.rst +++ b/docs/esps/sendgrid.rst @@ -217,6 +217,26 @@ Limitations and quirks (Tested March, 2016) +**Wrong character set on text attachments** + Under some conditions, SendGrid incorrectly identifies text attachments (text/plain, + text/calendar, etc.) as using ISO-8859-1 encoding, and forces ``charset="iso-8859-1"`` + into the attachments' MIME headers. This generally causes any non-ASCII characters in + the attachments to be replaced with incorrect or illegal characters in the recipient's + email client. + + The behavior is unpredictable, and may vary by SendGrid account or change over time. + There is no reliable, general workaround that Anymail could implement. You may be able + to counteract the issue by enabling open and/or click tracking in your SendGrid + account. The only way to completely avoid the problem is switching to a non-text + attachment type (e.g., application/pdf) or limiting your text attachments to use only + ASCII characters. See `issue 150 `_ + for more information and other possible workarounds. + + If this impacts your usage, it's helpful to report it to SendGrid support, so they can + quantify customers affected and prioritize a fix. + + (Noted June, 2019 and December, 2019) + **No envelope sender overrides** SendGrid does not support overriding :attr:`~anymail.message.AnymailMessage.envelope_sender` on individual messages.