Click or drag to resize
IEmailExtraction Interface
Extraction plugin interface that offers functions that you can use to pass extractions back for further processing by the program.

Functions specified in this interface may be invoked from multiple threads simultaneously for different emails for parallel processing. You must make sure that the implementation is thread-safe. For a given email, this will typically only be invoked from a single thread except in the case of an error where a retry may invoke it from another thread.

Namespace: MailAttachmentDownloaderPluginAPI
Assembly: MailAttachmentDownloaderPluginAPI (in MailAttachmentDownloaderPluginAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface IEmailExtraction

The IEmailExtraction type exposes the following members.

Methods
  NameDescription
Public methodExtractFromEmail
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;
}
Top
See Also