This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients dandre, r.david.murray
Date 2011-07-28.13:57:00
SpamBayes Score 8.1427476e-11
Marked as misclassified No
Message-id <1311861420.91.0.260613508941.issue12649@psf.upfronthosting.co.za>
In-reply-to
Content
You are using Header incorrectly.  It should look more like this:

    th = _e_header.Header(maxlinelen=200, header_name='To')
    th.append(tfc[:-1])
    th.append(wtc[:-1], charset='utf-8')
    th.append(tem)


This results in:

  To: ABCDEFGH =?utf-8?b?0ILYgeC5hOC8kuGPiuGauw==?= <abcdefg@hijk-lmnopqr.st>

Which is valid per RFC, which encoding the address is not.  A compliant mailer should be able to handle the Subject line from your version correctly, but not the To or From lines.

The fact that you don't want the trailing spaces is an artifact of the API.  Using this API requires more knowledge of the RFCs than anyone should want to have.  In Python 3.3 we will be introducing a new API in the email package that will make all of this *much* simpler.

The maxlinelen issue does appear to be a bug, though.
History
Date User Action Args
2011-07-28 13:57:01r.david.murraysetrecipients: + r.david.murray, dandre
2011-07-28 13:57:00r.david.murraysetmessageid: <1311861420.91.0.260613508941.issue12649@psf.upfronthosting.co.za>
2011-07-28 13:57:00r.david.murraylinkissue12649 messages
2011-07-28 13:57:00r.david.murraycreate