﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1541	Add multipart message capability to django.core.mail	bruce@…	Malcolm Tredinnick	"I wanted to be able to use the integrated mail functionality to send multipart messages.  However, in Python 2.4.1, you cannot simply give send_mail a MIMEMultipart message.  It errors, trying to encode.  The encoding step is really not needed if you've already constructed a  MIMEText or MIMEMultipart message.  So, I went ahead and added that functionality by making a ""SafeMIMEMultipart"" class.  If the message parameter is either SafeMIMEMultipart or SafeMIMEtext, it is accepted without re-encoding.  Another way to do this would've been to put a ""skip_reencode"" parameter on the method, but I prefer more transparent solutions.

Eample usage:
--------------
msg = mail.SafeMIMEMultipart('alternative', charset=""utf-8"")
msg.attach(mail.SafeMIMEText(""example text part"", ""text""))
msg.attach(mail.SafeMIMEText(""<p>example <b>html</b> part"", ""html""))
mail.send_mail(""example multipart mail"", msg, ""me@example.com"", [""you@example.com"",])

"	defect	closed	Core (Mail)		normal	fixed		rushman@… ross@… mssnlayam@…	Accepted	1	0	1	0	0	0
