Hi;<div><br></div><div><div>A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.</div><div><br></div><div> /var/www/html/<a href="http://mysite.com/simplemail/mail2.py">mysite.com/simplemail/mail2.py</a></div>
<div> 40 </head></div><div> 41 <body>'''</div><div> 42 my_mail()</div><div> 43 print '''</div><div> 44 </body></div><div>my_mail = <function my_mail></div><div> /var/www/html/<a href="http://mysite.com/simplemail/mail2.py">mysite.com/simplemail/mail2.py</a> in my_mail()</div>
<div> 27 to_address = ourEmail,</div><div> 28 subject = subject,</div><div> 29 message = message</div><div> 30 ).send()</div><div> 31 print 'Thank you, %s, we will get back to you shortly!<br />' % (name)</div>
<div>message = 'Name: beno -\nMessage: test'</div><div> /var/www/html/<a href="http://mysite.com/simplemail/simplemail.py">mysite.com/simplemail/simplemail.py</a> in send(self=<simplemail.Email object>)</div>
<div> 344 smtp = smtplib.SMTP()</div><div> 345 if self.smtp_server:</div><div> 346 smtp.connect(self.smtp_server)</div><div> 347 else:</div><div> 348 smtp.connect()</div>
<div>smtp = <smtplib.SMTP instance>, smtp.connect = <bound method SMTP.connect of <smtplib.SMTP instance>>, self = <simplemail.Email object>, self.smtp_server = 'localhost'</div><div> /usr/lib64/python2.4/smtplib.py in connect(self=<smtplib.SMTP instance>, host='localhost', port=25)</div>
<div> 305 if not self.sock:</div><div> 306 raise socket.error, msg</div><div> 307 (code, msg) = self.getreply()</div><div> 308 if self.debuglevel > 0: print>>stderr, "connect:", msg</div>
<div> 309 return (code, msg)</div><div>code undefined, msg = 'getaddrinfo returns an empty list', self = <smtplib.SMTP instance>, self.getreply = <bound method SMTP.getreply of <smtplib.SMTP instance>></div>
<div> /usr/lib64/python2.4/smtplib.py in getreply(self=<smtplib.SMTP instance>)</div><div> 349 if line == '':</div><div> 350 self.close()</div><div> 351 raise SMTPServerDisconnected("Connection unexpectedly closed")</div>
<div> 352 if self.debuglevel > 0: print>>stderr, 'reply:', repr(line)</div><div> 353 resp.append(line[4:].strip())</div><div>global SMTPServerDisconnected = <class smtplib.SMTPServerDisconnected></div>
<div>SMTPServerDisconnected: Connection unexpectedly closed </div><div> args = ('Connection unexpectedly closed',)</div><div><br></div><div>Notice that line:</div><div><br></div><div>code undefined, msg = 'getaddrinfo returns an empty list', </div>
<div><br></div><div>What up? How do I get an address to return?</div><div>TIA,</div><div>Susan</div></div>