[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire
New submission from Michaël Lemaire : Hi, I noticed that SMTP.send_message, when getting the sender and recipients from the Message object, strips the name from recipients (to keep only the address), but not from the sender. if from_addr is None: # Prefer the sender field

[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire
Michaël Lemaire added the comment: Sure : #coding: utf-8 import email.utils from email.message import EmailMessage from smtplib import SMTP m = EmailMessage() m['From'] = email.utils.formataddr(("Michaël", "mich...@example.com")) m['To'] = email.util

[issue32727] smtplib's SMTP.send_message behaves differently with from_addr and to_addrs

2018-01-30 Thread Michaël Lemaire
Michaël Lemaire added the comment: Oups @r.david.murray, just saw I posted over your message, and removed you from the nozy list, sorry. -- nosy: +r.david.murray ___ Python tracker <https://bugs.python.org/issue32