Fix some python3 syntax errors
This commit is contained in:
+3
-3
@@ -142,13 +142,13 @@ def send_dsn(mailfrom,receiver,msg=None,timeout=600,session=None,ourfrom=''):
|
||||
if badrcpts:
|
||||
return badrcpts
|
||||
return None # success
|
||||
except smtplib.SMTPRecipientsRefused,x:
|
||||
except smtplib.SMTPRecipientsRefused as x:
|
||||
if len(x.recipients) == 1:
|
||||
return x.recipients.values()[0] # permanent error
|
||||
return x.recipients
|
||||
except smtplib.SMTPSenderRefused,x:
|
||||
except smtplib.SMTPSenderRefused as x:
|
||||
return x.args[:2] # does not accept DSN
|
||||
except smtplib.SMTPDataError,x:
|
||||
except smtplib.SMTPDataError as x:
|
||||
return x.args # permanent error
|
||||
except smtplib.SMTPException:
|
||||
pass # any other error, try next MX
|
||||
|
||||
Reference in New Issue
Block a user