Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
hard coding comments to email
ttriemst
Good Afternoon,
I have a job that is working great, but I would like to send another email (the workflow already sends one email) to a specific user. I would like the email to have a hard coded link in it, and it will never change. I have been doing some checking in the Workflow Developers Guide, but am not able to find what I need. I did some checking around in the developers forum and have not had any luck. The following is what I have so far:
<!-- =================== Update Notification ==================== -->
<externaltask name="UpdateUsers"
owner="__TAG__('iw_user');"
description="Template Deployed">
<areavpath v="__INSERT__($areavpath);"/>
<successors>
<successorset description = "The template was deployed">
<succ v="end"/>
</successorset>
</successors>
__INSERT__(get_mail_cmd("$iwhome", 'xxxxxxx@xxxx.com'));
</externaltask>
Any suggestions would be helpful. Thanks
Find more posts tagged with
Comments
Dwayne
I believe that you can add the following variables to your task definition to override the default values for the generated email
Task Variable Corresponding flag Meaning
mail_html -H send mail as HTML
mail_taskname -N taskname target task name
mail_message_file -b filename file which contains the body of the email message
mail_cc -c user user to get a CC: of the message
mail_error -e tell workflow engine of any errors (CallBack of 1)
mail_from -f user who should this message be from?
mail_message -m "message body" the actual body of the message (use this OR -b, not both)
mail_subject -s "subject" the subject of the email
mail_to -t recipient who should get the email
mail_url -u Add URL references even if not in HTML mode
This is from TS 6.1, but I believe most, if not all, of these worked in earlier versions as well (perhaps not -e).
So, in your example, you could do something like this, if your mail message were stored in a file named c:\iw-home\local\config\mailmessage.txt:
<!-- =================== Update Notification ==================== -->
<externaltask name="UpdateUsers"
owner="__TAG__('iw_user');"
description="Template Deployed">
<areavpath v="__INSERT__($areavpath);"/>
<successors>
<successorset description = "The template was deployed">
<succ v="end"/>
</successorset>
</successors>
__INSERT__(get_mail_cmd("$iwhome", 'xxxxxxx@xxxx.com'));
<variables>
<variable key="mail_message_file" value="c:/iw-home/local/config/mailmessage.txt" />
</variables>
</externaltask>
(Woot - my first DevNet post!)
Adam Stoller
Not bad Dwayne ;-)
Actually, the '-e' flag has been there for a while too, though seldom used as most folks don't consider failure to send email an error (plus it is only able to trap errors delivering to the SMTP server - not the actual transmission from the SMTP server to the intended destinations)
However, if you want the basic email body that is already sent & you want to *add* an extra link in the body of the message, you'll want to make a copy of iwsend_mail.ipl and modify it accordingly.
Alternatively, you could use the iw_solution_email.ipl script (located in IWHOME/local/config/wft/solutions/) and configure the email via a PT, and you can hard-code whatever you want to appear in the message within the PT.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
ttriemst
Thanks for the info...I ended up using the mail_url and it works great.
ttriemst
Thanks for the ideas. I like the idea of trying to catch an error if it does not go through. Thanks