I changed my Email Compose setting in outlook from default setting of HTML to Rich Text. After that I sent myself a sample email that had few embedded messages as part of my signature.
I then tried to drag and drop this file into our system which is designed to extract all the details from uploaded file. When I debugged the code, it shows that I received 3 linked resources (their names begin with ATT followed by some numeric value). My code is designed to look for the filename that I get from LinkedResources
int startIndex = objAttachment.ContentType.Name.LastIndexOf("."); var attachmentName = objAttachment.ContentType.Name.Substring(0, startIndex);
Problem that I face here is ContentType.Name does not have any extention to it (ATT23456) due to which my followed line would throw and exception.
My next step is to scan for this filename in the HtmlBody and then replace the current image url with the new URL (I would uploaded the attachment to azure and the embed the azure blob uri as the link)
I have attached the sample file that I used to test this.
Rich Text email.zip (39.6 KB)
Please let me know if I am missing something that helps to deal with this scenario.
Thank you.