Opened 18 years ago

Closed 17 years ago

#2007 closed enhancement (fixed)

Allow sending email in a non-default encoding

Reported by: russblau@… Owned by: Adrian Holovaty
Component: Core (Mail) Version:
Severity: normal Keywords:
Cc: django@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Since #1235, all email is now encoded using the encoding found in the DEFAULT_CHARSET setting. This is fine for a default, but there should be an optional argument added to send_mail() to permit specifying a different encoding for mail when needed.

Change History (6)

comment:1 by Adrian Holovaty, 17 years ago

Component: Core frameworkdjango.core.mail

comment:2 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by simonbun <simonbun@…>, 17 years ago

Cc: django@… added

Maybe Django could use a project wide EMAIL_CHARSET setting that defaults to DEFAULT_CHARSET?

comment:4 by Jon Colverson <djangotrac@…>, 17 years ago

This would be useful for working around some awkward SpamAssassin behavoir. When using the UTF-8 encoding, Python encodes the mail using BASE64. This triggers a SpamAssassin test (MIME_BASE64_NO_NAME) because it detects a BASE64 attachment without a filename. This gives the mail an extra spamminess of 0.224 points, which is not much, but I'd rather avoid it by encoding my mail with us-ascii or whatever to avoid the BASE64 encoding.

in reply to:  4 comment:5 by Jon Colverson <djangotrac@…>, 17 years ago

Replying to Jon Colverson <djangotrac@vcxz.co.uk>:
As pointed out on the mailing list, my concerns are probably better addressed by ticket:3472.

comment:6 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5553]) Fixed #2007 -- Added support for configurable encoding of email message bodies.

Note: See TracTickets for help on using tickets.
Back to Top