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


Groups > comp.lang.python > #89928

Re: Why from en to two times with sending email

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'that?': 0.05; 'subject:two': 0.07; 'bash': 0.09; 'subject:Why': 0.09; '12:59': 0.16; 'headers,': 0.16; 'headers.': 0.16; 'subject:sending': 0.16; 'supplied': 0.16; 'wrote:': 0.18; "aren't": 0.24; 'instance,': 0.24; 'mon,': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'included': 0.31; 'url:python': 0.33; 'at:': 0.34; 'subject:from': 0.34; 'message.': 0.35; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'smtp': 0.36; 'url:org': 0.36; 'two': 0.37; 'server': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'recipients': 0.61; '2015': 0.84; 'bcc': 0.84; 'subject:times': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=owfFLByvrCCYfpZuynIgveaW3S899gEtvOJGjEVLWEQ=; b=PTQuvpUrXR9B4Nvk3SY9zih9oQIgxrzH53QgPf/TSTTu4jzkx1YHpbyi+zadP8lt58 ttBxqMXmqGZBkLCdvLFIeojl9HCK1Jj99KHZTp6ySmW508lRWkuFaC2O0hhFIdQPdfuQ mSgVjHSgE+85GTFf0bKe0C0dTn6jlDir+8Sep0J1hcift7ZYRbevc34uq4c3vTxseDOJ kiBcFQjNs9GNT9Qz9mjk6kEs4LWH/wcew9Pb9rgi2tTYcxVY4VK8JNVD+BK8G7JqMmIk TW2dV5FhhQ+dAIJKJhTPm9Ge93x3/e1rRvu+VEKQJAXvdjoO0pg4quryi6bMWAw5ja2B tnAQ==
X-Received by 10.107.12.158 with SMTP id 30mr15677375iom.61.1430768963214; Mon, 04 May 2015 12:49:23 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <87ioc8i2y2.fsf@Equus.decebal.nl>
References <87ioc8i2y2.fsf@Equus.decebal.nl>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Mon, 4 May 2015 13:48:42 -0600
Subject Re: Why from en to two times with sending email
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.103.1430768965.12865.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1430768965 news.xs4all.nl 2859 [2001:888:2000:d::a6]:47093
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:89928

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web