Click or drag to resize
IEmailExtractionExtractFromEmail Method
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;

Namespace: MailAttachmentDownloaderPluginAPI
Assembly: MailAttachmentDownloaderPluginAPI (in MailAttachmentDownloaderPluginAPI.dll) Version: (
Dictionary<string, Object> ExtractFromEmail(
	string account,
	string ruleName,
	string savedFilename,
	string attachmentFilename,
	string uniqueID,
	MailMessage message


Type: SystemString
The email account that is being used to download this attachment.
Type: SystemString
The matching rule name.
Type: SystemString
The fully qualified formatted filename including the path.
Type: SystemString
The attachment filename without the path.
Type: SystemString
The uniqueID for the email.
Type: System.Net.MailMailMessage
The email message.

Return Value

Type: DictionaryString, Object
Dictionary of string to objects that can be used for replacements. Allowed object types are string, double and int.
See Also