Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89926 > unrolled thread

Why from en to two times with sending email

Started byCecil Westerhof <Cecil@decebal.nl>
First post2015-05-04 20:59 +0200
Last post2015-05-04 22:13 +0200
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Why from en to two times with sending email Cecil Westerhof <Cecil@decebal.nl> - 2015-05-04 20:59 +0200
    Re: Why from en to two times with sending email Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-04 13:48 -0600
      Re: Why from en to two times with sending email Cecil Westerhof <Cecil@decebal.nl> - 2015-05-04 22:13 +0200

#89926 — Why from en to two times with sending email

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-05-04 20:59 +0200
SubjectWhy from en to two times with sending email
Message-ID<87ioc8i2y2.fsf@Equus.decebal.nl>
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?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [next] | [standalone]


#89928

FromIan Kelly <ian.g.kelly@gmail.com>
Date2015-05-04 13:48 -0600
Message-ID<mailman.103.1430768965.12865.python-list@python.org>
In reply to#89926
On Mon, May 4, 2015 at 12:59 PM, Cecil Westerhof <Cecil@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.

[toc] | [prev] | [next] | [standalone]


#89935

FromCecil Westerhof <Cecil@decebal.nl>
Date2015-05-04 22:13 +0200
Message-ID<87y4l4gkyj.fsf@Equus.decebal.nl>
In reply to#89928
Op Monday 4 May 2015 21:48 CEST schreef Ian Kelly:

> On Mon, May 4, 2015 at 12:59 PM, Cecil Westerhof <Cecil@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.

OK, thanks.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web