+1 vote

We get an hourly email containing an excel spreadsheet which I then process automatically

Recently the sending organisation has changed their process, and the attachment is now an email, and inside that is the excel spreadsheet. They are unwilling to resolve this, so I just need to dig a bit deeper to get this to work.

Please can you show me how to handle the attachment within an attachment extraction as I've failed to work this out myself.

by

1 Answer

0 votes
 
Best answer

There is an easy way out IMail.ExtractAttachmentsFromInnerMessages:

IMail mail = ...
ReadOnlyCollection<MimeData> attachments =
    mail.ExtractAttachmentsFromInnerMessages();

It extracts attachments from this email and all attached emails.

You can find more info on how to process inner messages here:
https://www.limilabs.com/blog/process-emails-embedded-as-attachments

by (301k points)
...