How to send email using glideemailoutbound api

dev115415
Tera Expert

How to send email using glideemailoutbound api. I want to send email from my script include.

3 REPLIES 3

Karan Chhabra6
Mega Sage
Mega Sage

Hi @dev115415 ,

 

Please refer to this article: https://www.servicenow.com/community/developer-articles/glideemailoutbound-send-notifications-using-...

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!

@Karan Chhabra6  I tried that approach but it did not work. was it working for you?

First step your script include needs to be under Global application.

then try to use this sample script it works well for me 

var email = new GlideEmailOutbound();
email.setSubject("Email subjct");
email.setBody('The Email Body');
email.setFrom('set the from here');
email.addRecipient('recipient');
email.save();