Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3746 Lượt xem

Hi, I am currently using odoo version 12 and python 3.6. 

I have a problem sending out emails with attachments. With more than 4 attachments with each attachment of the size of 3mb. 

My error log: 

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,
return write self._sslobj.write (data)
socket.timeout: Write operation timed out

During handling of the above exception Reviews Reviews another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/smtplib.py", line 882, in sendmail 
(code, respectively) = 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

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
SMTPServerDisconnected ('please run connect () first')
smtplib.SMTPServerDisconnected: please run connect () first - -

Any idea why this happens and how to solve this? 

Thanks alot.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thanks Silverstar.

But the problem is different. I can upload my attachment, there's no problem in uploading. After i upload the attachment, when i clicked send, there's where the error comes in.

I specifically made sure of the total size of the attachment does not go over 20MB. When there's less than 4 attachment, there's no problem in sending. But when there's more than 4 (the size still does not go over 25MB), the timeout and smtp disconnect occurs. Any idea why? 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,

Refter this link - https://www.odoo.com/forum/help-1/question/file-size-limit-error-42610

Ảnh đại diện
Huỷ bỏ