New submission from Célestin Matte <pyt...@cmatte.me>:

When giving recipients in a string format ("email1, email2") to sendmail(), an 
email is sent to the first email in the list only.
This is not a bug since the documentation indicates that sendmail() takes 
either a list of addresses, or a single address in a string. However, this 
error is easy to make since the "To:" field expects a comma-separated series of 
email addresses in a string format.

I suggest either that:
- sendmail() accepts a series of emails in a string format: "email1, email2" 
for the recipient lists
- sendmail() raises an exception if a series of email in a string format is 
detected

Attached is an example script to test confusing behaviour (email is sent to 
ema...@mydomain.com only):

----------
files: test_sendmail.py
messages: 398228
nosy: cmatte
priority: normal
severity: normal
status: open
title: smtplib: less confusing behaviour when giving incorrect multiple 
recipients list
type: enhancement
Added file: https://bugs.python.org/file50182/test_sendmail.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44742>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to