function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scooter429Scooter429 

Multiple Email Attachments via API

Can someone please confirm whether it’s still the case that the only way (using the API) to add an attachment to an email is via a template.  (I appreciate that this is advertised as an unsupported feature.)  Is there any work around to add multiple attachments to a template via the API?

Thank you.
gsickalgsickal
I got around this limitation by (1) creating a temporary template using the api, (2) creating several new attachment objects making sure to set the parent id to the newly created template in step 1, and finally (3) selecting this email template when i wanted to send an email with multiple attachments using the sendmail api.  When the email is sent I delete the temporary template which also deletes the attachments.