Problem using mimetools.encode

Skip Montanaro skip at mojam.com
Mon Oct 2 18:45:56 EDT 2000


Sorry to bug the list, but I'm sort of at loose ends here.

I tried using mimetools.encode to generate a quoted-printable MIME-encoded
mail message body.  I ran the body through mimetools.encode(r, w,
"quoted-printable") (where 'r' and 'w' were suitable StringIO objects) and
included a "Content-Transfer-Encoding: quoted-printable" header in the
message.  The message was sent using smtplib.SMTP().

When I received the mail message it was all hacked up (basically everything
between two "=" signs on the same line were gone, including the "=" signs
themselves) and the message contained an X-MIME-Autoconverted header that
said in effect it had automatically converted the message to 8bit from
quoted-printable.

When I tried running mimetools.encode interactively, the output looked
reasonable.  All attempts to locate information about X-MIME-Autoconverted
headers were polluted by its occurrence all over the place in web-based
mailing list archives.  I found nothing searching directly at sendmail.org
(I run sendmail, so I presume it's ultimately the culprit).

Any pointers to information on sneaking quoted-printable encoded messages
through mail transfer agents (particularly sendmail) would be much
appreciated.

Thanks,

-- 
Skip Montanaro (skip at mojam.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list