Overview
The Send a Regular Email message type is a versatile method of triggering a basic message in text format via Email. Developers can choose to send a static message or dynamically pull data fields from a retrieval application to be included in the message body. The data can further be filtered by passing parameters from the application to the message content. Recipients can be hard-coded or dynamic from an Address Distribution list.
Data for Email
Merge Data Retrieved by an m-Power Retrieval Application
– Select a Retrieval Application: Select the dictionary and application that you wish to use in your task. You can use a Retrieval or Report for this task type.
-Additional Retrieval Parameters: Additional parameters can be passed through the URL to filter the retrieval data. Use the “Toggle Parameter Help” button to assist with creating this URL.
Note: Regular email task type will always be embedded in the email
Map Fields to Retrieval Application: Only available if the “Accepts maintainer parms” box was checked in the Task Type screen. With this option, you are able to map fields from the maintainer to the fields of your retrieval.
-Additional Retrieval Parameters: Additional parameters can be passed through the URL to filter the retrieval data. Use the “Toggle Parameter Help” button to assist with creating this URL.
Note: Regular email task type will always be embedded in the email
Map Fields to Retrieval Application: Only available if the “Accepts maintainer parms” box was checked in the Task Type screen. With this option, you are able to map fields from the maintainer to the fields of your retrieval.
Create a Static Email Message (No Data Merge)
Select this option if you want to completely hardcode a static message for the body of the email. The message will be added in the “Email Info” section.
Recipients
- Recipient address source – Use a distribution list: This option allows you to use a Distribution List Retrieval to send your emails. Select the dictionary where the Distribution List Retrieval lives and the Retrieval application itself. Any additional parameters you wish to pass to filter retrieval results can be entered using the “Toggle Parameter Help” button.
- Map distribution list fields to Retrieval Application: If using a distribution list, you can filter the target application by mapping fields from the Distribution List Retrieval to the target retrieval fields. For example, you can map CUSNO (customer number) from the distribution list to the CUSNO field of the target application and each customer will receive their own data.
- Recipient address source – Use email address from web form: This option should only be used if invoking your task from a maintainer. Enter the field from the maintainer that will hold the email address to deliver the email to as well as the optional CC email address field name.
- Map maintainer fields to distribution list: If a Distribution List is selected and the “Accepts maintainer parms” box was checked on the Task Type screen, you are able to filter the distribution list dynamically by mapping fields from the maintainer to the Distribution List Retrieval. For example, if you have a customer order form maintainer triggering a task group, you can map CUSNO (customer number) from the maintainer to filter the Distribution Lists records to only return emails for their customer number. This is a dynamic way to send emails from a maintainer.
- Additional Addresses: Enter any hard coded email addresses here that you wish to always receive an email. Multiple addresses may be added separated by a comma.
Email Info
- Message Body: The text entered here will be included as the body of the email.
- If the option to merge data from a retrieval was selected, type [ to see a list of data fields that can be inserted into the email.
- Sender: This will be the ‘from’ address when the recipient receives their email. This needs to be a working email address. If left blank, the sender address will pull from the configuration file.
- Subject: Controls the subject of the email. If passing any parameters to the report via the additional parameters box or mapping fields, you can use these parameters in the filename as well. For example, if mapping CUSNO from a maintainer to the CNUM of the target application, you can use ‘Notification for ${CNUM}’ as the subject line. You may also use built in variables to pull current timestamp or date when the task is ran. Use ${timestamp} or ${datestamp} for these respectively.
- Attachments: List filenames (including the file extension) of any file that will be attached to the email. There are three options to attach files to emails:
- Files that are stored on the m-Power server in /mrcjava/job_streams/attachments can be attached to emails by simply hardcoding the filename (including the file extension) in the “File Attachment” text box. Multiple files can be listed separated by a comma.
- Alternatively, if your target application includes a field to store the filename, you may use the fieldname substitution
${FIELD}
in place of the hardcoded filename to dynamically attach files to your email.
- Alternatively, if your target application includes a field to store the filename, you may use the fieldname substitution
- If your files are stored in another directory, you can attach them to emails by hardcoding the absolute path and filename (or field substitution) in the “File Attachment” text box.
- For example: C:/Uploads/Orders/${FILENAME}
- If you are utilizing an Output Folder setup, you can reference the output directory with the syntax:
queue_[queue folder name]
.- For example: I have an Output Folder Name of “SecureUpload”. I would enter
queue_SecureUpload/${FILENAME}
.
- For example: I have an Output Folder Name of “SecureUpload”. I would enter
- Files that are stored on the m-Power server in /mrcjava/job_streams/attachments can be attached to emails by simply hardcoding the filename (including the file extension) in the “File Attachment” text box. Multiple files can be listed separated by a comma.
Review
- Review: Overview of all options that make up your task. A great tool for troubleshooting tasks.