Django

Code

Ticket #2007 (closed: fixed)

Opened 3 years ago

Last modified 1 year ago

Allow sending email in a non-default encoding

Reported by: russblau@imapmail.org Assigned to: adrian
Milestone: Component: django.core.mail
Version: Keywords:
Cc: django@versea.be Triage Stage: Design decision needed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

11/26/06 18:33:05 changed by adrian

  • component changed from Core framework to django.core.mail.

02/25/07 19:12:28 changed by SmileyChris

  • stage changed from Unreviewed to Design decision needed.

03/05/07 03:27:44 changed by simonbun <simonbun@versea.be>

  • cc set to django@versea.be.

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

(follow-up: ↓ 5 ) 03/08/07 09:33:28 changed by Jon Colverson <djangotrac@vcxz.co.uk>

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 ) 03/09/07 09:53:24 changed by Jon Colverson <djangotrac@vcxz.co.uk>

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

06/27/07 07:54:15 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #2007 (Allow sending email in a non-default encoding)




Change Properties
Action