This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SMTPLib sendmail fails on hyphenated adr
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, shadowlore
Priority: normal Keywords:

Created on 2002-03-31 19:57 by shadowlore, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg10097 - (view) Author: Bill Anderson (shadowlore) Date: 2002-03-31 19:57
When using smtplib's SMTP.sendmail, if the To: address
contains a hyphen, the To: header will be silently dropped.

To duplicate:

Follow the docstring for smtplib.SMTP.sendmail, and use
a hyphenated email address, such as foo-help@somewhere.org




msg10098 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-04-01 05:35
Logged In: YES 
user_id=12800

I don't believe it.  I use smtplib all the time to send
messages to Mailman addresses that contain hyphens and I've
never seen a problem, going back to Python 1.5.2 and up to
Python 2.3(cvs).

Note that as far as the SMTP protocol is concerned, and
smtplib as well, the body of the message which contains the
To: header, really isn't part of the SMTP dialog.  The
envelope sender and recipients are the important determining
factors in where the message goes and where the message
comes from.  These are the first two arguments to
.sendmail().  The body of the message -- including the
headers -- is spit right out to the SMTP server, after
canonicalizing stuff like line endings as per the RFC.

Much more likely is that your MTA -- i.e. the thing you're
connected to (your SMTP server) -- is munging things.

If you can explain more about your environment, I might be
able to help.  You should also attach a .py file that
exactly reproduces your problem and I will test it with my MTA.
msg10099 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2002-04-15 17:14
Logged In: YES 
user_id=12800

I'm moving this status to Pending; waiting on a response
from the submitter.
History
Date User Action Args
2022-04-10 16:05:10adminsetgithub: 36361
2002-03-31 19:57:48shadowlorecreate