[issue6327] [mimetext] long lines get cut with exclamation mark and newline

Jeff Hull report at bugs.python.org
Wed Nov 17 16:32:05 CET 2010

Jeff Hull <jsh2134 at gmail.com> added the comment:

I also have this problem with text getting replaced with the exclamation point.

I am using this class.
from email.MIMEText import MIMEText

Perhaps it didn't work for you because you didn't send it via email. 

try this code

	msgAlternative = MIMEMultipart('alternative')
	msgText = MIMEText(text, 'html')

	mailServer = smtplib.SMTP()
	mailServer.login(user, pass)
	mailServer.sendmail(sender,to, msg.as_string())

nosy: +Jeff.Hull

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list