IEmailExtraction Interface |
Namespace: MailAttachmentDownloaderPluginAPI
The IEmailExtraction type exposes the following members.
Name | Description | |
---|---|---|
ExtractFromEmail |
This method is invoked once for every attachment being saved. You can use this to extract data from the headers of the email message.
This function may be invoked from multiple threads simultaneously for different emails for parallel processing.
Example below shows how to extract the subject without spaces to a new field called {SUBJECT_NO_SPACES}.
public void ExtractFromEmail(string account, string ruleName, string uniqueID, MailMessage message) { var result = new Dictionary<string, object>(); result.Add("{SUBJECT_NO_SPACES}", message.Subject.Replace(" ", "")); return result; } |