[FIX] base: traceback on testing outgoing mail server connection
- Settings > Technical > Email > Outgoing Mail Servers; - Create a new serve with no security; - Test connection. Before this commit, a traceback error is raised. This occurs because SMTPException don't have 'smtp_error'. Now, the UserError is shown correctly. opw-2464796 closes odoo/odoo#67712 X-original-commit: f0e478a154b1f15146c7d95e0ffe146bb22b8cae Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
@@ -146,7 +146,7 @@ class IrMailServer(models.Model):
|
||||
except smtplib.SMTPResponseException as e:
|
||||
raise UserError(_("Server replied with following exception:\n %s", ustr(e.smtp_error)))
|
||||
except smtplib.SMTPException as e:
|
||||
raise UserError(_("An SMTP exception occurred. Check port number and connection security type.\n %s", ustr(e.smtp_error)))
|
||||
raise UserError(_("An SMTP exception occurred. Check port number and connection security type.\n %s", ustr(e)))
|
||||
except SSLError as e:
|
||||
raise UserError(_("An SSL exception occurred. Check connection security type.\n %s", ustr(e)))
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user