Cannot send email

G F gscotfleming at yahoo.com
Thu Jul 15 12:50:57 EDT 2010


A while back I was working for a company and set up a little python script to send out maintenance emails for some equipment we had set up in the field. The script collected information about the equipment composed an email and sent it out to interested persons. Then I left the company and they changed their ISP and got a new IP address. Now the emails are not getting through. The email server is the same as before but it is not working. Below is the error messaage that is reported by the script.

Does anyone have any ideas where the trouble is and what can be done about it? The little bit about:
"reply: retcode (557); Msg: This mail server does not accept mail addressed to anInterestedPerson at yahoo.com" 
seems to be telling but I do not know why the server would respond this way.



Thank you.



>>> s = smtplib.SMTP(emailHost)
>>> s.set_debuglevel(1)
>>> s.sendmail(emailAddress, sendTo, testTxt)
send: 'ehlo [127.0.1.1]\r\n'
reply: '250-AUTH LOGIN PLAIN\r\n'
reply: '250-AUTH LOGIN\r\n'
reply: '250-AUTH=LOGIN\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-SIZE 40960000\r\n'
reply: '250 HELP\r\n'
reply: retcode (250); Msg: AUTH LOGIN PLAIN
AUTH LOGIN
AUTH=LOGIN
8BITMIME
SIZE 40960000
HELP
send: 'mail FROM:<emailAddress at theCompany.com> size=10\r\n'
reply: '250  Address Okay\r\n'
reply: retcode (250); Msg: Address Okay
send: 'rcpt TO:<anInterestedPerson at yahoo.com>\r\n'
reply: '557 This mail server does not accept mail addressed to gscotfleming at yahoo.com\r\n'
reply: retcode (557); Msg: This mail server does not accept mail addressed to anInterestedPerson at yahoo.com

send: 'rset\r\n'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/smtplib.py", line 708, in sendmail
    self.rset()
  File "/usr/lib/python2.6/smtplib.py", line 438, in rset
    return self.docmd("rset")
  File "/usr/lib/python2.6/smtplib.py", line 363, in docmd
    return self.getreply()
  File "/usr/lib/python2.6/smtplib.py", line 340, in getreply
    raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed
>>> 



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100715/47236da1/attachment.html>


More information about the Python-list mailing list