Can't Connect To SMTP

Victor Subervi victorsubervi at gmail.com
Wed Feb 24 15:32:43 CET 2010


Hi;
I'm getting this error:

A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.

 /var/www/html/globalsolutionsgroup.vi/simplemail/mail2.py
   52 </head>
   53 <body>'''
   54 my_mail()
   55 print '''
   56 </body>
my_mail = <function my_mail>
 /var/www/html/globalsolutionsgroup.vi/simplemail/mail2.py in my_mail()
   33       to_address = ourEmail1,
   34       subject = subject,
   35       message = message
   36   ).send()
   37   Email(
message = 'Name: beno -\nMessage: test'
 /var/www/html/globalsolutionsgroup.vi/simplemail/simplemail.py in
send(self=<simplemail.Email object>)
  344         smtp = smtplib.SMTP()
  345         if self.smtp_server:
  346             smtp.connect(self.smtp_server)
  347         else:
  348             smtp.connect()
smtp = <smtplib.SMTP instance>, smtp.connect = <bound method SMTP.connect of
<smtplib.SMTP instance>>, self = <simplemail.Email object>, self.smtp_server
= 'localhost'
 /usr/lib64/python2.4/smtplib.py in connect(self=<smtplib.SMTP instance>,
host='localhost', port=25)
  305         if not self.sock:
  306             raise socket.error, msg
  307         (code, msg) = self.getreply()
  308         if self.debuglevel > 0: print>>stderr, "connect:", msg
  309         return (code, msg)
code undefined, msg = 'getaddrinfo returns an empty list', self =
<smtplib.SMTP instance>, self.getreply = <bound method SMTP.getreply of
<smtplib.SMTP instance>>
 /usr/lib64/python2.4/smtplib.py in getreply(self=<smtplib.SMTP instance>)
  349             if line == '':
  350                 self.close()
  351                 raise SMTPServerDisconnected("Connection unexpectedly
closed")
  352             if self.debuglevel > 0: print>>stderr, 'reply:',
repr(line)
  353             resp.append(line[4:].strip())
global SMTPServerDisconnected = <class smtplib.SMTPServerDisconnected>
SMTPServerDisconnected: Connection unexpectedly closed
      args = ('Connection unexpectedly closed',)

I'm having a hard time reading this and making sense of it. Please help me
understand where I should look to fix the problem.
TIA,
beno

-- 
The Logos has come to bear
http://logos.13gems.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100224/ff3754b8/attachment.html>


More information about the Python-list mailing list