Reputation: 14640
I would like to upload an attachment once and send it for multiple emails (~5000 emails per day. Emails with different content, but same attachment). Does SendGrid API provide an option to use previously uploaded files as attachments?
It's ok to even upload the file via a web service or any other method since it's a one time task.
The main goal is not to upload the file for every email sent. I looked at the SendGrid documentation for attachments but couldn't find my answer. https://sendgrid.com/docs/Classroom/Build/Add_Content/attachments.html
Upvotes: 1
Views: 530
Reputation: 9814
You can reduce the number of times that you need to upload the file significantly by putting the variable content into Section and Substitution parameters . Essentially you'll be batching some requests together, maybe 1 API call per 100 recipients, which will get the job done in 1/100th of the bandwidth you'd use for sending the attachment each time.
Upvotes: 1
Reputation: 2273
SendGrid does not provide a remote file store, so no. The best workaround would be to host the file somewhere else, and link to it in the email, as opposed to literally attaching it.
Upvotes: 2