Add message to Mail Target


Is there a way to add a message and an attachment in a mail target? I have an attachment that I am sending via email. I would like to include instructions in the body of the mail target. How would I update the message? I know that you can pass a message in the Mail Notification activity but it looks like you can only sent an attachment from a specific file path instead of being part of the process.



Email Target can only send data in an attachment or in the body of the email and therefore the rest of the attributes that can be overwritten in this service do not include "message".
However in your case you want to attach a file and send instructions in the the email body. So try the following approach:
1. Save the output file in a folder. Put a File Target and place the output into that folder. Suppose I create an activity as OutputFileTarget.
2. Now place a PutContextVar after File Target activity and do the following in this function.
    A. Select the Notification activity (here I have named notification activity as NotifyPurchaseDepartment) in the Activity Name drop down.
    B. Select the property you want to overwrite, such as fileName, filePath, mailSubject and message.
    C. For each the value would be $$Service.<file target name>.<attribute name>$$
    D. Using the above syntax would retrieve the attributes of the File target and map it to the attributes of Email notification. Make sure the activity and attribute names are case sensitive.

In the Variable Value field you can combine any constant with the Service derived value as shown here for mailSubject. It can be a simple constant as well as shown here for "message" variable.

Have more questions? Submit a request


Article is closed for comments.