[Python-Dev] [Python-checkins] r86327 - in python/branches/py3k: Doc/includes/email-mime.py Doc/includes/email-simple.py Doc/library/smtplib.rst Doc/whatsnew/3.2.rst Lib/smtplib.py Lib/test/test_smtplib.py Misc/NEWS
Éric Araujo
merwok at netwok.org
Mon Nov 8 23:22:42 CET 2010
> Author: r.david.murray
> New Revision: 86327
>
> Log: #10321: Add support for sending binary DATA and Message objects to smtplib
>
> Modified: python/branches/py3k/Doc/includes/email-mime.py
> ==============================================================================
> # Send the email via our own SMTP server.
> s = smtplib.SMTP()
> -s.sendmail(me, family, msg.as_string())
> +s.sendmail(msg)
> s.quit()
If I’m not mistaken, you’re giving a message object to a method that
only accepts str or bytes. That line should read s.send_message(msg).
Regards
More information about the Python-Dev
mailing list