-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Currently, there’s no way to set Reply-To in the same way as To, Cc, or Bcc:
>>> import emails
>>> ivan = ('Иван', 'ivan@example.com')
>>> maria = ('Марья', 'maria@example.net')
>>> msg = emails.Message(mail_to=[ivan], cc=[maria], text='Hello world!')
>>> print(msg.as_string())
[...]
To: =?utf-8?b?0JjQstCw0L0=?= <ivan@example.com>
Cc: =?utf-8?b?0JzQsNGA0YzRjw==?= <maria@example.net>
[...]
>>> msg = emails.Message(mail_to=[ivan], reply_to=[maria], text='Hello world!')
Traceback (most recent call last):
File "<ipython-input-13-598375a47f5d>", line 1, in <module>
msg = emails.Message(mail_to=[ivan], reply_to=[maria], text='Hello world!')
TypeError: __init__() got an unexpected keyword argument 'reply_to'
>>> msg = emails.Message(mail_to=[ivan], headers={'Reply-To': [maria]}, text='Hello world!')
>>> print(msg.as_string())
[...]
Reply-To: ,
To: =?utf-8?b?0JjQstCw0L0=?= <ivan@example.com>
[...]
A reply_to parameter to emails.Message (and emails.html, etc.) would be nice.
danqing, fph and robobenklein
Metadata
Metadata
Assignees
Labels
No labels