Example scripting for email notifications
-
- UpdatedAug 1, 2024
- 1 minute read
- Xanadu
- Notifications
Examples of scripting for email notifications.
Scripting examples for email notifications
A simple text string is the most basic example of the way a mail script works. This script
prints out "Incident number - INC00001".
More advanced scripts, like this one, can be found by browsing through the base system
email templates.
To dynamically change field values within an email, use the following functions within
<mail_script> syntax:
Using the instance_name property ensures that the notification still
works when migrated between instances.
You can specify copied and blind copied recipients by using the email object within a mail
script.
The following is an example script to add users from watch_list as
copied recipients.
On this page
Related Content
- JavaScript in emails
Create mail scripts in System Notifications Email Notification Email Script , and refer to them by using ${mail_script:script name} in the script field.
- Mail script API
Certain variables are available when processing mail_script scripts.
- Useful attachment scripts
This is a searchable version of the Useful Attachment Scripts.
- TemplatePrinter API
- GlideEmailOutbound API