MailImport business rule

The MailImport business rule is used to import emails from a POP account and place them as elements in a module. One element for each incoming email is created in a subfolder. In a typical usage situation, stakeholders can issue requirements or support issues by using emails.
Note: The business rule must be stored in a folder. Because the POP account user name and password are not encrypted when they are stored in the expression, be careful when you grant configuration access to the module in which the business rule is activated.

Prerequisites

Format

In the business rule container folder, which can be any folder in the module, enter the business rule in the following format:
 =MailImport("pop3://user name:password@POP3 Server Address/INBOX","Delete from Server","Mail Sender Attribute","Mail-ID Attribute","File Attribute","update_interval=1m")
Note: For the .txt files, use the parameter "texttofile" parameter at the end of the business rule:
=MailImport("pop3://user name:password@POP3 Server Address/INBOX","true","Mail Id","Mail Sender","Attachments","update_interval=1m",”texttofile”)

Parameters

Parameter Description
"pop3://user name:password@POP3 Server Address/INBOX" The URL to mail server, which includes the user name and password
"Delete from Server" If this parameter is set to "true," emails are deleted from the server after they are fetched. If you do not want to delete the emails from the server, enter "false".
"Mail Sender Attribute " The name of the attribute in which to store the mail sender. You can use a Text attribute.
"Mail-ID Attribute" The name of the attribute in which to store the mail ID. You can use a Text attribute.
"File Attribute" The name of the attribute in which to store attachments. Use a File attribute.
"update_interval"
With this parameter, you can specify the interval between the two runs. For the expression "update_interval=1h", the interval time between the execution of two business rules is set to one hour. You can use this parameter for all of the business rules.
Note: You must set a logical value to this parameter. For example, setting interval as one second or one minute affects the performance of the product.
"run_at=8,7,3"

With this parameter, you can determine a specific time to update the business rule. You cannot use both "update_interval=" and "run_at=" at the same time. For the expression "run_at=8,7,3", the business rule runs once a week at 8:00 am, and will start running in three days. The numbers in the parameter represent start_at, days_between_runs, and days_before_first_run. You can customize this parameter according to your need. For example, you can use "run_at=8" that runs the business rule at 8:00 am or "run_at=8,7" that runs business rule once a week at 8:00 am. You can use this parameter for all of the business rules.

texttofile This parameter is added so that the text file is displayed as an attachment in the mail. Else the content of the text file is displayed in the description.

Feedback