I am using Sendgrid API v3 in a node.js and express environment.
I am using email dynamic templates and easily I can send custom text to the email templates.
But I need also to add attachments and I can't find documentation about that. I need to add attachments in 2 different ways:
- There are email that need to have always the same attachments and it would be good for the email template to have its own attachments that is send to the customer inbox not matter what is the server data sent to sendgrid.
- If a clinet buys an ebook, this file should be sent by the server, together with the rest of {{{data}}} to Sendgrid and this specific file should be delivered to the client as an attachments.
Can anyone say how to add attachments this way?
Thanks