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


Groups > comp.lang.python > #61849

Re: Using pythons smtp server

Path csiph.com!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runs': 0.10; '>the': 0.16; 'line).': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'app': 0.19; 'module': 0.19; 'thu,': 0.19; 'url:home': 0.24; 'server.': 0.24; 'header:X -Complaints-To:1': 0.27; 'dec': 0.30; '-0700,': 0.31; 'initiate': 0.31; 'file': 0.32; 'url:python': 0.33; 'but': 0.35; 'smtp': 0.36; 'next': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'unit': 0.37; 'received:76': 0.38; 'server': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'more': 0.64; 'day': 0.76; 'examples.': 0.84; 'shutdown': 0.84; 'subject:Using': 0.84; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Using pythons smtp server
Date Fri, 13 Dec 2013 12:24:14 -0500
Organization IISS Elusive Unicorn
References <CALyJZZXNDuBBgG0Mw_BvajzbfLk4QbADAjG+z_xAVG9Q75sUYQ@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-76-249-30-188.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 6.00/32.1186
X-No-Archive YES
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.4084.1386955493.18130.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386955493 news.xs4all.nl 2875 [2001:888:2000:d::a6]:32886
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61849

Show key headers only | View raw


On Thu, 12 Dec 2013 18:01:58 -0700, Vincent Davis
<vincent@vincentdavis.net> declaimed the following:

>I have an app that generates a file one a day and would like to email it
>using pythons SMTP server.
>http://docs.python.org/2/library/smtpd.html#smtpd.SMTPServer
>The documentation is kinda sparse and I cant seem to find any good examples.
>
>Basically what I want to do; when my app runs it would initiate a SMTP
>server, send the attachment and shutdown the SMTP after.
>

	I suspect you don't want the "server" per se -- that's more a unit for
receiving SMTP mail (sure, you can start it, but then you have to send the
email to IT so it can relay it to the next server in the line).

	Look into the smtplib module (section 20.12 in the v2.7.2
documentation) in order to send email TO a mail server
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Re: Using pythons smtp server Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-13 12:24 -0500

csiph-web