Hello,
how can i identify and download the target of a Cloud Attachment?
Mail with Cloud Attachment:
Test Mail mit Cloud Attachment.zip (59.6 KB)
Kind regards,
Andy
Hello,
how can i identify and download the target of a Cloud Attachment?
Mail with Cloud Attachment:
Test Mail mit Cloud Attachment.zip (59.6 KB)
Kind regards,
Andy
Please try using following example on your end to access the cloud attachment that appear as Linked resource.
public static void TestAttachment()
{
String path = @"C:\Users\mudas\Downloads\Test Mail mit Cloud Attachment (1)\";
MailMessage msg = MailMessage.Load(path+ "Test Mail mit Cloud Attachment.msg");
for (int i = 0; i < msg.Attachments.Count; i++)
{
Attachment attachment = msg.Attachments[i];
// The above attachment is a file, the size of this file after extraction is not same as the one attached to the parent EML or MSG file.
}
for (int i = 0; i < msg.LinkedResources.Count; i++)
{
LinkedResource linkedResource = msg.LinkedResources[i];
// The above linkedResource is a file, the size of this file after extraction is not same as the one attached to the parent EML or MSG file.
linkedResource.Save(path + linkedResource.ContentType.Name);
}
}