Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.037 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'lookup': 0.09; 'works.': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; '>the': 0.16; 'line).': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'app': 0.19; 'module': 0.19; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'url:home': 0.24; 'server.': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'that.': 0.31; 'too.': 0.31; '-0700,': 0.31; '13,': 0.31; 'initiate': 0.31; 'file': 0.32; 'url:python': 0.33; 'fri,': 0.33; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'right?': 0.36; 'smtp': 0.36; 'url:listinfo': 0.36; 'next': 0.36; 'url:org': 0.36; 'unit': 0.37; 'received:209': 0.37; 'server': 0.38; 'skip:& 10': 0.38; 'url:library': 0.38; 'little': 0.38; 'url:mail': 0.40; 'how': 0.40; 'address': 0.63; 'more': 0.64; 'day': 0.76; 'examples.': 0.84; 'shutdown': 0.84; 'subject:Using': 0.84; '2013': 0.98 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=9KX+JCSznG/bhYAIB6IsRnnyWOapyTBWADlW61d+9RU=; b=XO8nD2oQ1ALVBnILQ6Rcl/070thuv2Lgje6NPfjtgzE+K1kmPB2qeWsYzA5YNE9DWZ z0AzZDFyFxxYyIUqDDRPOxcSCVBipHD0dd0Z4t7PxOyCdPVpu/fcQnQij+4f/yWPs1BT Hg0WUqZYBUFbMhkwm6Xvjq9sjpLZHzuLOCZ1mRwLtC/2hhX1GgA35ibhP5Defmm8JYqN 6GHDHizwQMb3VapTdI3FEfzhVQA0eBXRLdjrxvmX5Ue4LGLN63XAQdKu9jqVIl0iKhTY ylWoapYCh+4Y0sMoje+DOJYNSt+uiaLsmVdWwNC00N0Fm1YC9/KND02SASeiDTS3vk6Q rj5g== X-Gm-Message-State: ALoCoQlRlYuoHrYzkznRi6NfWrDFFZwtl1mB9Mvd2VDmOd5GF24gWGnelQ6zwoqTW61qypT2wKwS X-Received: by 10.182.44.167 with SMTP id f7mr2490666obm.3.1386956675130; Fri, 13 Dec 2013 09:44:35 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Vincent Davis Date: Fri, 13 Dec 2013 10:44:15 -0700 Subject: Re: Using pythons smtp server To: Dennis Lee Bieber Content-Type: multipart/alternative; boundary=001a11c1d7e0f0c03104ed6e0369 X-Mailman-Approved-At: Fri, 13 Dec 2013 19:03:19 +0100 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 120 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386957805 news.xs4all.nl 2970 [2001:888:2000:d::a6]:56863 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61853 --001a11c1d7e0f0c03104ed6e0369 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =E2=80=8BDo I have that right? =E2=80=8B Vincent Davis 720-301-3003 On Fri, Dec 13, 2013 at 10:24 AM, Dennis Lee Bieber wrote: > On Thu, 12 Dec 2013 18:01:58 -0700, Vincent Davis > 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 uni= t > for > receiving SMTP mail (sure, you can start it, but then you have to send th= e > 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 > --001a11c1d7e0f0c03104ed6e0369 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Obviously I don't really know how this works. I have u= sed python to send email using "my" smtp server (whatever that ma= y be gmail, postfix..)
But I don't want to do that. After a little m= ore research I think what I need to do is lookup the MX address of the addr= ess I want to send the email too.
Then submit the email to that address using smtplib.SMTP =C2=A0
=E2=80=8BDo I have that right?
=E2=80=8B

Vin= cent Davis
720-301-3003=


On Fri, Dec 13, 2013 at 10:24 AM, Denn= is 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 i= t
>using pythons SMTP server.
>
http://docs.python.org/2/library/smtpd.html#smtpd.SMTPS= erver
>The documentation is kinda sparse and I cant seem to find any good exam= ples.
>
>Basically what I want to do; when my app runs it would initiate a SMTP<= br> >server, send the attachment and shutdown the SMTP after.
>

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

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

--
https://mail.python.org/mailman/listinfo/python-list

--001a11c1d7e0f0c03104ed6e0369--