Skip to content

Commit 95080bf

Browse files
authored
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.
1 parent 59685b8 commit 95080bf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/esps/sendgrid.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,26 @@ Limitations and quirks
217217

218218
(Tested March, 2016)
219219

220+
**Wrong character set on text attachments**
221+
Under some conditions, SendGrid incorrectly identifies text attachments (text/plain,
222+
text/calendar, etc.) as using ISO-8859-1 encoding, and forces ``charset="iso-8859-1"``
223+
into the attachments' MIME headers. This generally causes any non-ASCII characters in
224+
the attachments to be replaced with incorrect or illegal characters in the recipient's
225+
email client.
226+
227+
The behavior is unpredictable, and may vary by SendGrid account or change over time.
228+
There is no reliable, general workaround that Anymail could implement. You may be able
229+
to counteract the issue by enabling open and/or click tracking in your SendGrid
230+
account. The only way to completely avoid the problem is switching to a non-text
231+
attachment type (e.g., application/pdf) or limiting your text attachments to use only
232+
ASCII characters. See `issue 150 <https://github.com/anymail/django-anymail/issues/150>`_
233+
for more information and other possible workarounds.
234+
235+
If this impacts your usage, it's helpful to report it to SendGrid support, so they can
236+
quantify customers affected and prioritize a fix.
237+
238+
(Noted June, 2019 and December, 2019)
239+
220240
**No envelope sender overrides**
221241
SendGrid does not support overriding :attr:`~anymail.message.AnymailMessage.envelope_sender`
222242
on individual messages.

0 commit comments

Comments
 (0)