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: MailAttachmentDownloaderPluginAPIAssembly: MailAttachmentDownloaderPluginAPI (in MailAttachmentDownloaderPluginAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax Dictionary<string, Object> ExtractFromEmail(
string account,
string ruleName,
string savedFilename,
string attachmentFilename,
string uniqueID,
MailMessage message
)
Function ExtractFromEmail (
account As String,
ruleName As String,
savedFilename As String,
attachmentFilename As String,
uniqueID As String,
message As MailMessage
) As Dictionary(Of String, Object)
Dictionary<String^, Object^>^ ExtractFromEmail(
String^ account,
String^ ruleName,
String^ savedFilename,
String^ attachmentFilename,
String^ uniqueID,
MailMessage^ message
)
abstract ExtractFromEmail :
account : string *
ruleName : string *
savedFilename : string *
attachmentFilename : string *
uniqueID : string *
message : MailMessage -> Dictionary<string, Object>
Parameters
- account
- Type: SystemString
The email account that is being used to download this attachment. - ruleName
- Type: SystemString
The matching rule name. - savedFilename
- Type: SystemString
The fully qualified formatted filename including the path. - attachmentFilename
- Type: SystemString
The attachment filename without the path. - uniqueID
- Type: SystemString
The uniqueID for the email. - message
- Type: System.Net.MailMailMessage
The email message.
Return Value
Type:
DictionaryString,
ObjectDictionary of string to objects that can be used for replacements. Allowed object types are string, double and int.
See Also