Skip to main content

Save Mail Message

AutomatR.Mail.SaveMailMessage

The "Save Mail Message" activity in AutomatR, part of the Mail activities package, is designed to save an email message (MailMessage object) to a specified folder. This activity facilitates the storage and archiving of email messages as part of automation workflows.

Properties

NameDescription
Input
Mail MessageSpecifies the MailMessage object that needs to be saved. Variables of type System.Net.Mail.MailMessage containing the email message to be saved.
Location PathSpecifies the full path where the MailMessage object should be saved. String variables containing the destination folder path. If the path includes the file name and extension, the activity will use that; otherwise, a new file with a unique name will be created with the ".eml" extension.
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Save Mail Message" activity. This optional delay can help handle synchronization issues. Integer variables containing the delay duration (e.g., 5 seconds).

How to Use

  1. Drag and drop the "Save Mail Message" activity onto the workflow.
  2. Configure the properties by specifying the MailMessage object and the folder path where the email message should be saved.
  3. Optionally, configure the display name for the activity.
  4. Execute the workflow to save the email message to the specified folder.

Example

Consider an example where the "Save Mail Message" activity is used to save an email message (emailMessage) to a folder named "Emails":

Save Mail Message:
Display Name: "Save Email"
Mail Message: emailMessage
Location Path: "C:\Documents\Emails"

In this example, the activity saves the specified email message to the "C:\Documents\Emails" folder. Adjust the input properties according to the requirements of your workflow.