- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 02:01 PM
I have a scripted schedule job where reports are sent to users dynamically. Now I need to set "From" in those emails.
Where do I provide that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 02:31 PM - edited 04-27-2023 02:39 PM
OK I figured that myself.
1. Created a email script "FromMajorIncident"
email.setFrom("Major Incident Management <MajorIncidentManagement@test.com>");
2. Included that email script in my scheduled job script as
var scheduled_report = new GlideRecord('sysauto_report');
scheduled_report.report_body = "bla bla bla<br/>${mail_script:FromMajorIncident}";
var answer = scheduled_report.insert();
It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 02:31 PM - edited 04-27-2023 02:39 PM
OK I figured that myself.
1. Created a email script "FromMajorIncident"
email.setFrom("Major Incident Management <MajorIncidentManagement@test.com>");
2. Included that email script in my scheduled job script as
var scheduled_report = new GlideRecord('sysauto_report');
scheduled_report.report_body = "bla bla bla<br/>${mail_script:FromMajorIncident}";
var answer = scheduled_report.insert();
It worked.