Opened 17 years ago

Closed 15 years ago

#3472 closed (fixed)

Convince send_mail to not base64-encode the email

Reported by: Matthias Urlichs <smurf@…> Owned by: Adrian Holovaty
Component: Core (Mail) Version: dev
Severity: Keywords: base64, send_mail
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you use utf8, mails will be base64-encoded by Python. That is a Bad Idea.

This patch tells it not to do that.

Attachments (2)

email-as-qp.patch (1.9 KB ) - added by Matthias Urlichs <smurf@…> 17 years ago.
Use quoted-printable, not base64, when mailing
email-as-qp.2.patch (379 bytes ) - added by smurf@… 17 years ago.

Download all attachments as: .zip

Change History (11)

by Matthias Urlichs <smurf@…>, 17 years ago

Attachment: email-as-qp.patch added

Use quoted-printable, not base64, when mailing

by smurf@…, 17 years ago

Attachment: email-as-qp.2.patch added

comment:1 by smurf@…, 17 years ago

Better patch: just replace the standard utf-8 charset.

The Subject: line seems to still be needlessly quoted-printable-encoded; I'll have to see what I can do about that. :-/

comment:2 by Simon G. <dev@…>, 17 years ago

Keywords: send_mail added
Triage Stage: UnreviewedReady for checkin

comment:3 by Jacob, 17 years ago

Can you explain to be *why* this change is needed? I don't like checking in code I don't understand :)

comment:4 by smurf@…, 17 years ago

  • It blows up the mail for no good reason. Some people still have to watch their bandwidth...
  • Many mail filters frequently don't MIME-decode emails.
  • SpamAssassin and other filters assign a high score to base64-encoded mail, especially if the content is ASCII, because spammers use it to circumvent filters.

Reason enough? ;-)

comment:5 by chris h., 17 years ago

I'd second the vote to add this patch... we ran into an issue with a vendor consuming our e-mail and not being able to decode the message even though other e-mail clients like GMail and Lotes Notes were fine with it.

comment:6 by nick.lane.au@…, 17 years ago

Perhaps the mime encoding type should be configured in the settings. Quoted-printable might not be the best choice for non-latin languages, while base64 may cause spam filter issues.

There is a ticket discussing this issue on trac's trac.

comment:7 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5143]) Fixed #3472 -- Don't BASE64-encode UTF-8 (or ASCII) email messages.
Patch from smurf@….

comment:8 by phr, 15 years ago

Resolution: fixed
Status: closedreopened

BTW, there's even better way to avoid unnecessary encoding:

from email import Charset 
Charset.add_charset('utf-8',Charset.SHORTEST,None,'utf-8')

The above will set Content-Transfer-Encoding to 7bit
or 8bit as needed - exactly as Mutt or Thunderbird do.

comment:9 by Alex Gaynor, 15 years ago

Resolution: fixed
Status: reopenedclosed

Please don't reopen tickets closed by core developers (especially ones closed 2 years ago), if you think this is still an issue file a *new* bug.

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