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


Groups > comp.lang.python > #46541

sendmail smtplib.SMTP('localhost') Where is the email?

From inq1ltd <inq1ltd@inqvista.com>
Subject sendmail smtplib.SMTP('localhost') Where is the email?
Date 2013-05-30 15:48 -0400
Organization inqvista
References <5190b049$0$29978$c3e8da3$5496439d@news.astraweb.com> <avhumdFft7tU1@mid.individual.net> <4773190.v3vY0HWMWS@mach-114-20>
Newsgroups comp.lang.python
Message-ID <mailman.2450.1369945339.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

python help,

I've tried this code which I got from:
http://www.tutorialspoint.com/python/python_sending_email.htm


I build this file and run it 
---//---

#!/usr/bin/python
 
import smtplib
sender = "inq1ltd@inqvista.com"
receivers = ["webmaster@inqvista.com"]

message = """From: jol
To: webmaster 
Subject: SMTP e-mail test

This is a test e-mail message.
"""

try:
   smtpObj = smtplib.SMTP('localhost')
   smtpObj.sendmail(sender, receivers, message)
   print "Successfully sent email"
except SMTPException:
   print "Error: unable to send email" 

--//--

After running the the file and I get 
"Successfully sent email"

My question is why doesn't webmaster get an email?

jol









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


Thread

[Off topic] Software epigrams Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-13 09:20 +0000
  Re: [Off topic] Software epigrams "marduk@python.net" <marduk@python.net> - 2013-05-13 10:56 -0400
  Re: [Off topic] Software epigrams Chris Angelico <rosuav@gmail.com> - 2013-05-14 03:47 +1000
  Re: [Off topic] Software epigrams Skip Montanaro <skip@pobox.com> - 2013-05-13 13:02 -0500
    Re: [Off topic] Software epigrams Neil Cerutti <neilc@norwich.edu> - 2013-05-13 18:42 +0000
      Re: [Off topic] Software epigrams Fábio Santos <fabiosantosart@gmail.com> - 2013-05-13 21:49 +0100
        Re: [Off topic] Software epigrams Neil Cerutti <neilc@norwich.edu> - 2013-05-15 17:24 +0000
          Re: [Off topic] Software epigrams Fábio Santos <fabiosantosart@gmail.com> - 2013-05-15 18:49 +0100
            Re: [Off topic] Software epigrams Neil Cerutti <neilc@norwich.edu> - 2013-05-15 18:27 +0000
              Re: [Off topic] Software epigrams Fábio Santos <fabiosantosart@gmail.com> - 2013-05-16 01:21 +0100
                Re: [Off topic] Software epigrams Neil Cerutti <neilc@norwich.edu> - 2013-05-16 14:23 +0000
                Re: [Off topic] Software epigrams Chris Angelico <rosuav@gmail.com> - 2013-05-17 00:37 +1000
                Re: Software epigrams rusi <rustompmody@gmail.com> - 2013-05-16 08:06 -0700
                Re: Software epigrams Chris Angelico <rosuav@gmail.com> - 2013-05-17 01:19 +1000
          python 2.7 vs 2.5 inq1ltd <inq1ltd@inqvista.com> - 2013-05-15 16:56 -0400
          sendmail smtplib.SMTP('localhost') Where is the email? inq1ltd <inq1ltd@inqvista.com> - 2013-05-30 15:48 -0400
          Re: sendmail smtplib.SMTP('localhost') Where is the email? Chris Angelico <rosuav@gmail.com> - 2013-05-31 08:13 +1000
          Re: sendmail smtplib.SMTP('localhost') Where is the email? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-05-30 19:23 -0400
  Re: [Off topic] Software epigrams Chris Angelico <rosuav@gmail.com> - 2013-05-14 04:12 +1000
    Re: [Off topic] Software epigrams Dan Sommers <dan@tombstonezero.net> - 2013-05-14 03:08 +0000
      Re: [Off topic] Software epigrams Chris Angelico <rosuav@gmail.com> - 2013-05-14 13:28 +1000
      Re: Software epigrams rusi <rustompmody@gmail.com> - 2013-05-15 20:55 -0700

csiph-web