Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Provide a convenient way to set Reply-To #115

@vfaronov

Description

@vfaronov

Currently, there’s no way to set Reply-To in the same way as To, Cc, or Bcc:

>>> import emails
>>> ivan = ('Иван', '[email protected]')
>>> maria = ('Марья', '[email protected]')
>>> msg = emails.Message(mail_to=[ivan], cc=[maria], text='Hello world!')
>>> print(msg.as_string())
[...]
To: =?utf-8?b?0JjQstCw0L0=?= <[email protected]>
Cc: =?utf-8?b?0JzQsNGA0YzRjw==?= <[email protected]>
[...]
>>> 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=?= <[email protected]>
[...]

A reply_to parameter to emails.Message (and emails.html, etc.) would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions