Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 04:35 AM
Can I use input parameter in an email script?
I have this code on my notification's body
HTTP Status: ${u_notes}
${mail_script:ErrorReportNotificationScript}
<mail_script>errorReport(${u_notes});</mail_script>
And this on my Email Script
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template, /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action, /* Optional GlideRecord */ event) {
function errorReport(status){
if (status >= 400 && status < 499) {
template.print("<p>Client Error!</p>");
} else if (status >= 500 && status< 599) {
template.print("<p>Server Error!</p>");
} else {
template.print("<p>Error!</p>");
}
}
})(current, template, email, email_action, event);I know that the code is not working but i put the code here just for an simple representation
Solved! Go to Solution.