- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @adityahubli ,
The reason your email didn’t send without template.print() is that the notification engine requires some body content to process.
If the notification record itself does not have a body defined, the mail script must produce output (via template.print()) to generate the body.
If you define a body in the notification (e.g., static text or variables), then template.print() is not required, and your script can just handle recipients, subject, etc.
I found this in the ServiceNow TemplatePrinter API which provides methods to handle printing from a mail script to the email message u will find this doc helpful:
https://developer.servicenow.com/dev.do#!/reference/api/zurich/server/no-namespace/c_TemplatePrinter...
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
template.print has the actual Body of email. It might not have sent since it was empty
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
@adityahubli I do not think template.print is required in your case. How did you call this in your notification body?
Check this SN docs example, for adding CC , template.print is not required.
Also, I checked on OOB instance the scrips for adding cc or BCC are not doing template.print.
If you are setting notification body correctly in your notification, template.print is not required in mail script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@adityahubli Did this answer your query?
Please mark the answer correct/helpful accordingly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@adityahubli Thanks for marking the solution helpful. You can mark all relevant answers correct for benefit of other users.