Using pythons smtp server

Vincent Davis vincent at vincentdavis.net
Fri Dec 13 12:44:15 EST 2013


Obviously I don't really know how this works. I have used python to send
email using "my" smtp server (whatever that may be gmail, postfix..)
But I don't want to do that. After a little more research I think what I
need to do is lookup the MX address of the address I want to send the email
too.
Then submit the email to that address using smtplib.SMTP
​Do I have that right?
​


Vincent Davis
720-301-3003


On Fri, Dec 13, 2013 at 10:24 AM, Dennis Lee Bieber
<wlfraed at ix.netcom.com>wrote:

> On Thu, 12 Dec 2013 18:01:58 -0700, Vincent Davis
> <vincent at 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 at ix.netcom.com    HTTP://wlfraed.home.netcom.com/
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131213/e7ec6284/attachment.html>


More information about the Python-list mailing list