fixes in outgoing email connection error handling
This commit is contained in:
parent
c296764cfe
commit
45ec64a58e
@ -54,24 +54,13 @@ class DocType:
|
|||||||
webnotes.msgprint(err_msg)
|
webnotes.msgprint(err_msg)
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
# exceptions are handled in smtp_connect
|
||||||
|
sess = out_email.smtp_connect()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sess = out_email.smtp_connect()
|
sess.quit()
|
||||||
|
except:
|
||||||
try:
|
pass
|
||||||
sess.quit()
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
except _socket.error, e:
|
|
||||||
# Invalid mail server -- due to refusing connection
|
|
||||||
webnotes.msgprint('Invalid Outgoing Mail Server or Port. Please rectify and try again.')
|
|
||||||
raise e
|
|
||||||
except smtplib.SMTPAuthenticationError, e:
|
|
||||||
webnotes.msgprint('Invalid Login Id or Mail Password. Please rectify and try again.')
|
|
||||||
raise e
|
|
||||||
except smtplib.SMTPException, e:
|
|
||||||
webnotes.msgprint('There is something wrong with your Outgoing Mail Settings. \
|
|
||||||
Please contact us at support@erpnext.com')
|
|
||||||
raise e
|
|
||||||
|
|
||||||
|
|
||||||
def validate_incoming(self):
|
def validate_incoming(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user