Opened 18 years ago
Closed 16 years ago
#3472 closed (fixed)
Convince send_mail to not base64-encode the email
Reported by: | 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)
Change History (11)
by , 18 years ago
Attachment: | email-as-qp.patch added |
---|
by , 18 years ago
Attachment: | email-as-qp.2.patch added |
---|
comment:1 by , 18 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 , 18 years ago
Keywords: | send_mail added |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:3 by , 18 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 , 18 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 , 18 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 , 18 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 , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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 , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
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.
Use quoted-printable, not base64, when mailing