> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com