Hello, I’m trying to build an email forwarder for our PEC address that don’t support this feature on new pec arrival.
So I started with IMAP Node and SMTP but I cannot send attachments, so I try to insert Function to extract Binary but how can i attach them to smtp?
this is my file
Ran a quick test and found a solution. You can remove the Function node between the Email Read IMAP node and the Send Email node. In the Attachments parameter of the Send Email node you should use this expression: {{Object.keys($binary).join(',')}}. This expression will reference the name the binary data, and create a comma separated list. You will then receive a single email with multiple attachments. This will also work if an email has a single attachment.