Unable to create email domain

when saving the smtp.gmail.com am getting the following error.
Traceback (most recent call last):
File “/home/next/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 289, in _save
self.check_if_latest()
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 631, in check_if_latest
where name = %s for update"“”.format(self.doctype), self.name, as_dict=True)
File “/home/next/frappe-bench/apps/frappe/frappe/database/database.py”, line 154, in sql
self._cursor.execute(query, values)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 516, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 727, in _read_query_result
result.read()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1066, in read
first_packet = self.connection._read_packet()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in _read_packet
packet.check_error()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
InternalError: (1205, u’Lock wait timeout exceeded; try restarting transaction’)

Traceback (most recent call last):
File “/home/next/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/next/frappe-bench/apps/frappe/frappe/handler.py”, line 20, in handle
data = execute_cmd(cmd)
File “/home/next/frappe-bench/apps/frappe/frappe/handler.py”, line 55, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/next/frappe-bench/apps/frappe/frappe/init.py”, line 1007, in call
return fn(*args, **newargs)
File “/home/next/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 289, in _save
self.check_if_latest()
File “/home/next/frappe-bench/apps/frappe/frappe/model/document.py”, line 631, in check_if_latest
where name = %s for update"“”.format(self.doctype), self.name, as_dict=True)
File “/home/next/frappe-bench/apps/frappe/frappe/database/database.py”, line 154, in sql
self._cursor.execute(query, values)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 516, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 727, in _read_query_result
result.read()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1066, in read
first_packet = self.connection._read_packet()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in _read_packet
packet.check_error()
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/next/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
InternalError: (1205, u’Lock wait timeout exceeded; try restarting transaction’)

It is possible that the ports are blocked by your service provider.
In some cases, this can also be caused by ipv6 issues.

A similar problem was solved here - the service provider had blocked the port - maybe check that using
smtp check

nc -vv outgoing.server 465

IMAP test

nc -vv incoming.server 993

hi

the link is not working

P No trees were harmed in the making or sending of this message. Consider the environment please don’t print this e-mail unless you really need to

Sorry - I wasn’t meaning the github link, just this one

hi

I can able to get rid of the error by putting port as 587. dont know, able to send the email. Now another problem arises when doing the uploading.

when I trying to upload accounts details following error is coming.

File {u’file_name’: u’/private/files/Account_(2) 2018-10-10 17:21:14.xlsx’} not found

The resource you are looking for is not available

P No trees were harmed in the making or sending of this message. Consider the environment please don’t print this e-mail unless you really need to

For that separate issue please see for eg these threads
Unable to import accounts details
Not being able to import excel data / file - #2 by clarkej