Click or drag to resize
IEmailProcessingOnProcessFile Method
After the attachment is downloaded or after any processing has occured, this function is called. You can perform post-download actions here for a given file. Any processing must be idempotent.

Note that for a given attachment, this function may be invoked many times. An example of such a case would be where processing is performed on a zip file. This would be invoked once for the zip file and then if the Unzip action was used, once for every file inside of the zip file. You can choose to do further processing based on the type of file if needed.

This function may be invoked from multiple threads simultaneously for different emails for parallel processing.

Example below shows how to just print the savedFilename out to the Console.

public void OnProcessFile(string account, string ruleName, string savedFilename, string attachmentFilename, string uniqueID, MailMessage message)
{
    Console.WriteLine(savedFilename);
}

Namespace: MailAttachmentDownloaderPluginAPI
Assembly: MailAttachmentDownloaderPluginAPI (in MailAttachmentDownloaderPluginAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
void OnProcessFile(
	string account,
	string ruleName,
	string savedFilename,
	string attachmentFilename,
	string uniqueID,
	MailMessage message
)

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.
See Also