> Hello there, > i have a customer list, each with a number of email address that we > send notifications to via text message. > the problem is, there are a number of providers ( just two ) that > reject our messages. > > What error do you get with the rejection? > > > the script goes a little something like this : > > Address = '[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>' > From = '[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>' > message = 'From: [EMAIL PROTECTED]: %s\r\nSubject: %s\r\n\r\n%s' % > (Address,'alert',message) > server.sendmail(From, Address, message) > > most of the time it goes thru ok. but only some providers have a > problem. However, those same providers get messages if i send them > thru Evolution. > > any ideas of what to check out?
I'd look at sendmail() exceptions, described in the smtplib docs. try: m.sendmail(...) except SMTPRecipientsRefused: print "All recipients were refused...." except SMTPHeloError: print "The server didn't reply properly to the ...." except SMTPSenderRefused: print "The server didn't accept the..." except SMTPDataError: print "The server replied with an ..." _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor