Re: 3.2: email.message.get_payload() delivers str, but send_message expect bytes

2011-04-12 Thread Axel Rau
On 08.04.11 13:43, Axel Rau wrote: > line 167, in sub > return _compile(pattern, flags).sub(repl, string, count) > TypeError: sequence item 1: expected bytes, str found I just filed issue 11837. Axel -- http://mail.python.org/mailman/listinfo/python-list

3.2: email.message.get_payload() delivers str, but send_message expect bytes

2011-04-08 Thread Axel Rau
Hi all, I'm just starting with imaplib, email and smtplib and try to write a SPAM reporter. I retrieve SPAM mails from an IMAP server and add them as message/rfc822 attachments to a report mail. Sometimes my call of smtplib.send_message works, sometimes, I get: -- File "/Library/Framewor