Describe the problem/error/question
The created workflow embeds a XML file into a PDF file and sends it back to the sender.
In the email client of the sender (tested with Thunderbird, which shows the size of attachments very well) the size of attachments send via n8n will not be displayed (Size unknown).
As far as I know, n8n uses nodemailer to send emails via the send mail node. The attachments object of nodemailer does not have a property “fileSize”, so I tried to use the property “header” instead, like this:
pdfFile.headers = {
'Content-Length': pdfFile.fileSize,
'Content-Transfer-Encoding': 'base64',
'X-Unsent': '1'
}
If I check the json output, the header is set correctly.
Unfortunately, this didn’t change anything. I searched extensively for this problem, but either I used the wrong search terms or no one seems to be addressing it.
Does it not work at all with nodemailer or do I miss something?
Workflow
Output returned by the last node
Information on your n8n setup
- n8n version: 1.83.2
- n8n EXECUTIONS_PROCESS setting (default: own, main): not set
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm in Docker (FROM n8nio/n8n:1.83.2)
- Operating system: Host: Manjaro, Docker: Alpine