nephish wrote: > ok, my fault. the router assigned the smtp server a different address > no longer 10.10.10.32, now 10.10.10.04 > tried the telnet thing and it worked, so i still dont know > why the script isnt working > > thanks Does it still give the same error????
ib.py", line 347, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed") SMTPServerDisconnected: Connection unexpectedly closed or is it different?? ~reed > > > On 07/20/2005 03:32:10 PM, Reed L. O'Brien wrote: >> nephish wrote: >> > On 07/20/2005 12:24:04 PM, Reed L. O'Brien wrote: >> >> nephish wrote: >> >> > Hey there, i am trying to get an email through an SMTP server on >> a >> >> > windows computer from a linux machine on the same network. >> >> > >> >> > >> >> >>>> import smtplib >> >> >>>> import MySQLdb >> >> >>>> Server = smtplib.SMTP('10.10.10.32') >> >> >>>> ToAddress = '[EMAIL PROTECTED]' >> >> >>>> FromAddress = '[EMAIL PROTECTED]' >> >> >>>> Message = 'Some text message' >> >> >>>> Server.sendmail(FromAddress, ToAddress, Message) >> >> >>>> >> >> > {} >> >> > >> >> > but nothing goes through, >> >> > now if i do this... >> >> > >> >> >>>> Server.connect() >> >> >>>> >> >> > >> >> > i get this >> >> > >> >> > Traceback (innermost last): >> >> > File "<stdin>", line 1, in ? >> >> > File "/usr/lib/python2.3/smtplib.py", line 303, in connect >> >> > (code, msg) = self.getreply() >> >> > File "/usr/lib/python2.3/smtplib.py", line 347, in getreply >> >> > raise SMTPServerDisconnected("Connection unexpectedly >> closed") >> >> > SMTPServerDisconnected: Connection unexpectedly closed >> >> > >> >> > now if i use the server on this computer ('localhost') >> >> > everything works ok. >> >> > >> >> > any ideas? >> >> > thanks, >> >> > <>< >> >> > >> >> > _______________________________________________ >> >> > Tutor maillist - Tutor@python.org >> >> > http://mail.python.org/mailman/listinfo/tutor >> >> > >> >> Can you telnet to port 25 on the other server? >> >> What does it respond to an EHLO command? >> >> HELO? >> >> can you get it to deliver there? >> >> >> >> ~r >> >> >> >> -- >> >> 4.6692916090 >> >> 'cmVlZG9icmllbkBnbWFpbC5jb20=\n'.decode('base64') >> >> http://www.spreadfirefox.com/?q=affiliates&id=16474&t=1 >> >> keyID: 0x0FA09FCE >> >> >> >> >> >> >> >> >> > i did this >> > telnet 10.10.10.32 >> > it responded with "unable to connect to remote host, connection >> refused" >> > >> > hmmm, perhaps there is something i am missing here. >> > this computer sits at 10.10.10.24 >> > the mail server is at 10.10.10.32 >> > and the other computer on the lan that can use it effectivly is at >> > 10.10.10.5 maybe the program it is using is passing some sort of >> > parameter that i am missing here. >> > >> > will check it all out again. >> > >> > thanks >> > >> That would be >> """use the IP you choose in lieu of localhost >> The 25 tels it to connect to the smtp port""" >> telnet localhost 25 >> Trying 127.0.0.1... >> Connected to localhost.localdomain (127.0.0.1). >> Escape character is '^]'. >> 220 my.dom.com ESMTP >> EHLO any.com >> 250-my.dom.com >> 250-AUTH LOGIN CRAM-MD5 PLAIN >> 250-AUTH=LOGIN CRAM-MD5 PLAIN >> 250-STARTTLS >> 250-PIPELINING >> 250 8BITMIME >> >> Try HELO if EHLO doesn't work. If you can't connect at all, no smtp >> server is running; or it is running on a non-standard port. >> >> best, >> ~r >> >> >> -- >> 4.6692916090 >> 'cmVlZG9icmllbkBnbWFpbC5jb20=\n'.decode('base64') >> http://www.spreadfirefox.com/?q=affiliates&id=16474&t=1 >> keyID: 0x0FA09FCE >> >> >> >> >> > -- 4.6692916090 'cmVlZG9icmllbkBnbWFpbC5jb20=\n'.decode('base64') http://www.spreadfirefox.com/?q=affiliates&id=16474&t=1 keyID: 0x0FA09FCE _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor