Author r.david.murray
Recipients athomas, esam, r.david.murray
Date 2010-01-11.01:47:21
SpamBayes Score 3.32487e-05
Marked as misclassified No
Message-id <1263174442.93.0.98104638318.issue7143@psf.upfronthosting.co.za>
In-reply-to
Content
The behavior you object to is in fact correct per RFC 2046, 5.5.1:

   The boundary delimiter MUST occur at the beginning of a line, i.e.,
   following a CRLF, and the initial CRLF is considered to be attached
   to the boundary delimiter line rather than part of the preceding
   part.

So in your example message your attatched file does not in fact have a final newline.  Note that you do not get a newline regardless of whether decode is true ('p' is the part extracted from your sample message):

>>> p.get_payload()
'MTIzCg=='
>>> p.get_payload(decode=True)
'123'
History
Date User Action Args
2010-01-11 01:47:23r.david.murraysetrecipients: + r.david.murray, athomas, esam
2010-01-11 01:47:22r.david.murraysetmessageid: <1263174442.93.0.98104638318.issue7143@psf.upfronthosting.co.za>
2010-01-11 01:47:21r.david.murraylinkissue7143 messages
2010-01-11 01:47:21r.david.murraycreate