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


Groups > comp.lang.python > #61849

Re: Using pythons smtp server

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Using pythons smtp server
Date 2013-12-13 12:24 -0500
Organization IISS Elusive Unicorn
References <CALyJZZXNDuBBgG0Mw_BvajzbfLk4QbADAjG+z_xAVG9Q75sUYQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4084.1386955493.18130.python-list@python.org> (permalink)

Show all headers | 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