Code

Opened 8 years ago

Closed 7 years ago

#2007 closed enhancement (fixed)

Allow sending email in a non-default encoding

Reported by: russblau@… Owned by: adrian
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: UI/UX:

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 (0)

Change History (6)

comment:1 Changed 7 years ago by adrian

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

comment:2 Changed 7 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by simonbun <simonbun@…>

  • Cc django@… added

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

comment:4 follow-up: Changed 7 years ago by Jon Colverson <djangotrac@…>

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.

comment:5 in reply to: ↑ 4 Changed 7 years ago by Jon Colverson <djangotrac@…>

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 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.