Why from en to two times with sending email

Ian Kelly ian.g.kelly at gmail.com
Mon May 4 15:48:42 EDT 2015


On Mon, May 4, 2015 at 12:59 PM, Cecil Westerhof <Cecil at decebal.nl> wrote:
> I want to change an old Bash script to Python. When I look at:
>     https://docs.python.org/2/library/email-examples.html
>
> Then from and to have to be used two times? Why is that?

Once to construct the message headers, and once to instruct the SMTP
server where to send the message. These are not required to agree; for
instance, bcc recipients need to be supplied to the server but aren't
included in the headers.



More information about the Python-list mailing list