В настоящее время я делаю проект с использованием odoo v12 и python 3.6.Я сталкиваюсь с некоторыми проблемами при отправке писем, которые имеют более 4 вложений размером около 3 МБ.Почта с вложением менее 4 проходит через все хорошо.
Это журнал отладки:
Exception while processing mail with ID 21513 and Msg-Id '<124397359842854.1569461532.970449209213257-openerp-85969-voip.phonecall@zen>'.
Traceback (most recent call last):
File "/usr/lib/python3.6/smtplib.py", line 354, in send
self.sock.sendall(s)
File "/usr/lib/python3.6/ssl.py", line 975, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.6/ssl.py", line 944, in send
return self._sslobj.write(data)
File "/usr/lib/python3.6/ssl.py", line 642, in write
return self._sslobj.write(data)
socket.timeout: The write operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
base/odoo/addons/base/models/ir_mail_server.py", line 489, in send_email
smtp.sendmail(smtp_from, smtp_to_list, message.as_string())
File "/usr/lib/python3.6/smtplib.py", line 882, in sendmail
(code, resp) = self.data(msg)
File "/usr/lib/python3.6/smtplib.py", line 568, in data
self.send(q)
File "/usr/lib/python3.6/smtplib.py", line 357, in send
raise SMTPServerDisconnected('Server not connected')
smtplib.SMTPServerDisconnected: Server not connected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
base/addons/mail/models/mail_mail.py", line 270, in send
smtp_session.quit()
File "/usr/lib/python3.6/smtplib.py", line 984, in quit
res = self.docmd("quit")
File "/usr/lib/python3.6/smtplib.py", line 420, in docmd
self.putcmd(cmd, args)
File "/usr/lib/python3.6/smtplib.py", line 367, in putcmd
self.send(str)
File "/usr/lib/python3.6/smtplib.py", line 359, in send
raise SMTPServerDisconnected('please run connect() first')
smtplib.SMTPServerDisconnected: please run connect() first
Есть идеи, почему это происходит и как это решить?Большое спасибо.