You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foreach(var attachment in attachments){
allAttachmentFilePaths.Add(getFilePath(attachment));foreach(var filePath in allAttachmentFilePaths){
attachFileToEmail(filePath, email);}}
In other words, with 2 attachments, the first iteration of the outer loop attaches the first attachment, and the second iteration attaches the first attachment again and then the second attachment.
The text was updated successfully, but these errors were encountered:
Description
If the task SendExchangeEmailWithAttachments is given multiple AttachmentFromString attachments, then the first attachment is duplicated.
Steps to reproduce
Call SendExchangeEmailWithAttachments with 2 AttachmentFromString attachments.
Expected behaviour
Each attachment should only appear once in the resulting email.
Notes
This occurs because the allAttachmentFilePaths loop is contained within the attachments loop. Abridged, the code looks like this:
In other words, with 2 attachments, the first iteration of the outer loop attaches the first attachment, and the second iteration attaches the first attachment again and then the second attachment.
The text was updated successfully, but these errors were encountered: