2. Use of GlideEmailOutbound API
Did you know you can send email notifications in ServiceNow without creating a notification record in the Notifications table?
With the help of the “GlideEmailOutbound()” method, you can send email notifications from your script without creating notification records.
The email object behaves identically for global and scoped applications.
GlideEmailOutbound()
Instantiates a scoped GlideEmailOutbound object.
Sample Script:
var mail = new GlideEmailOutbound();
mail.setReplyTo(‘agent@abc.com’);
mail.setSubject(‘Testing outbound email’);
mail.addAddress(‘cc’, ‘admin@example.com’);
mail.setBody(‘Hello world!’);
mail.save();
For more information please visit — https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c%5FGlideEmailOutboundScopedAPI
However, GlideEmailOutbound() class lacks the ability to send attachments or add templates to the outbound email. Because of this ServiceNow recommends sending notifications by events and altering the properties of the email using mail scripts.
https://medium.com/@LearnITbyPrashant/use-of-glideemailoutbound-api-c6454921516b?source=rss-d005fc598f0a------2