Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; '"""': 0.07; 'exception,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'try:': 0.09; 'python': 0.11; 'implies': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'thu,': 0.19; 'import': 0.22; 'print': 0.22; 'url:home': 0.24; 'question': 0.24; "i've": 0.25; 'header:X-Complaints-To:1': 0.27; 'tried': 0.27; "doesn't": 0.30; 'specified': 0.30; 'code': 0.31; 'file': 0.32; 'run': 0.32; 'url:python': 0.33; 'running': 0.33; 'skip:# 10': 0.33; 'subject:the': 0.34; 'message.': 0.35; 'except': 0.35; 'test': 0.35; 'machine.': 0.36; 'smtp': 0.36; "didn't": 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'received:76': 0.38; 'server': 0.38; 'configured': 0.38; 'to:addr :python-list': 0.38; 'subject:': 0.39; 'help,': 0.39; 'to:addr:python.org': 0.39; 'unable': 0.39; 'received:org': 0.40; 'email?': 0.60; 'url:htm': 0.73; 'email"': 0.84; 'message)': 0.84; 'subject:Where': 0.84; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: sendmail smtplib.SMTP('localhost') Where is the email? Date: Thu, 30 May 2013 19:23:38 -0400 Organization: > Bestiaria Support Staff < References: <5190b049$0$29978$c3e8da3$5496439d@news.astraweb.com> <4773190.v3vY0HWMWS@mach-114-20> <7572490.mfSH6Zg6jY@mach-114-20> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-76-253-96-209.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES 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: 52 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369956231 news.xs4all.nl 15974 [2001:888:2000:d::a6]:56409 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46556 On Thu, 30 May 2013 15:48:20 -0400, inq1ltd declaimed the following in gmane.comp.python.general: > 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? Since you specified "localhost", that implies you have an SMTPd running on your own machine. Since you didn't get an exception, that SMTPd accepted the message. You now need to find out what that SMTPd did with the message... Is it configured to relay to the mail server for "inqvista.com"? This is outside the domain of Python. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/