Closed albertchua closed 1 week ago
Hi all What's the plan for when attaching multiple attachments in API SDK? Just let me know if I missed documentation examples on how to do that.
Hi @albertchua, @Marmeladov, sorry for the late response and thank you for your patience. We've released a new version (3.0.1) that allows you to send an email with multiple attachments. You can find the example of usage in the snippet below:
string attachmentFilePath = "/temp/info.txt";
FileStream attachment = new FileStream(attachmentFilePath, FileMode.Open, FileAccess.Read);
string anotherAttachmentFilePath = "/temp/icon.png";
FileStream anotherAttachment = new FileStream(anotherAttachmentFilePath, FileMode.Open, FileAccess.Read);
EmailSendResponse sendResponse = emailApi.SendEmail(
from: "john.smith@somedomain.com",
to: new List<string>
{
"jane.smith@somecompany.com"
},
subject: "Mail subject text",
text: "Test message with file",
attachment: new List<FileParameter>
{
attachment,
anotherAttachment
}
);
I'm marking this as closed. Feel free to reopen the issue if it still persists.
Kind regards, Luka
Hi,
How to send an email with multiple attachments? 2.1.2 doesn't seem to support it.
Regards, Albert