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


Groups > comp.lang.python > #61853

Re: Using pythons smtp server

References <CALyJZZXNDuBBgG0Mw_BvajzbfLk4QbADAjG+z_xAVG9Q75sUYQ@mail.gmail.com> <kegma9pder3vv43f7jhsut4ghvqdg6527h@4ax.com>
From Vincent Davis <vincent@vincentdavis.net>
Date 2013-12-13 10:44 -0700
Subject Re: Using pythons smtp server
Newsgroups comp.lang.python
Message-ID <mailman.4088.1386957805.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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@ix.netcom.com>wrote:

> 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/
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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


Thread

Re: Using pythons smtp server Vincent Davis <vincent@vincentdavis.net> - 2013-12-13 10:44 -0700
  Re: Using pythons smtp server Grant Edwards <invalid@invalid.invalid> - 2013-12-13 18:12 +0000

csiph-web