Cannot save new email account

I cannot save new email account. When I did, the screen displayed overlay with “saving” message, but it hangs on that.

Then, I tried to change the http_timeout to 1 hours (3600 seconds). After I tried again, it showed:

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 51, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 70, in handle
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 93, in execute_cmd
ret =, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 751, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/”, line 18, in savedocs
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 214, in save
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 176, in insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 541, in run_before_save_methods
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 507, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 623, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 606, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 501, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/”, line 44, in validate
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/”, line 79, in check_smtp
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/”, line 165, in sess
frappe.throw(_(‘Invalid Outgoing Mail Server or Port’))
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 252, in throw
msgprint(msg, raise_exception=exc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 245, in msgprint
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 230, in _raise_exception
raise raise_exception, encode(msg)
ValidationError: Invalid Outgoing Mail Server or Port

Below is my setting

  • Service: GMail
  • Email Id: my username at Gmail
  • Password: my password
  • Enable Outgoing: Yes
    • SMTP Server:
    • Use TLS: Yes
    • Port: 587
    • Default Outgoing: Yes

I also have tried to use Mandrill, but it didn’t succeed.

Maybe your port is blocked (esp if you are using Amazon, you have to manually whitelist)