Administering : Managing business rules and expressions : Business rules definitions : MailImport business rule
  
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
The module to which you import the emails must have attributes in which to store the subject, contents, and mail sender. The mail subject is stored in the Title attribute, and the mail content is stored in the Description attribute. These attributes are always included in all modules and are automatically matched. Because the names of these attributes (Title and Description) are not considered in the expression, you can change them.
A Text attribute in which to store mail sender
A Text attribute in which to store mail ID
A File attribute in which to store attachments
A folder element in which to store the business rule. The business rule must be stored in a folder element.
An email account on a POP server that is available from the Focal Point server.
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")
For the .txt files, use the 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"
"true" deletes emails from the server after they are fetched.
"false" does not delete the emails from the server.
"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"
Specifies 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.
"run_at=8,7,3"
Specifies when 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 use this parameter for all of the business rules.
texttofile
Displays the text file as an attachment in the mail.
If you omit this parameter, the content of the text file is displayed in the description.
Go up to
Business rules definitions