1 個回答
- 最新
- 最多得票
- 最多評論
0
Hello.
Message size is limited to 10 MB, including attachments.
This size is after Base64 encoding, so I thought it might be over 10 MB depending on the files used and the content of the message.
https://docs.aws.amazon.com/ses/latest/dg/quotas.html
相關內容
已提問 3 年前

Hello, The size of file I tried is only 547KB (without any encoding)
Are messages and attachments less than 10 MB in size after encoding? Depending on the content of the attachment, it may be larger after encoding.
The attachment is around ~2MB after encoding. I just tried it with the below snippet: pdf_content = open('/tmp/file.pdf', 'rb').read() pdf_base64 = base64.b64encode(pdf_content).decode('utf-8') pdf_part = MIMEApplication(pdf_base64, 'pdf', Name='file.pdf') pdf_part.add_header('Content-Disposition', f'attachment; filename="file.pdf"') msg.attach(pdf_part) attachment_size = len(pdf_base64)
Will it not exceed 10MB even if encoded including the size of the body of the email, title, etc.?
yes, correct. For testing purpose just trying to send the attachment only (without body)