How to send an email from ServiceNow?

dev115415
Tera Expert

Hello I want to send an email to some person based on some logic of my app. I would like to do this from ServiceNow-> Script Include. How to do this?

1 ACCEPTED SOLUTION

Hello Thank you for your response

 

 

I will tell what I have done.

1. I created an Event Registry simply.

 

2. I created a Notfication

 

3. I created a Script Include and there I used 

gs.eventQueue('x_8041114_needlt.EmailEvent1',current,'abc@gmail.com','axyz@gmail.com');

 

Update

 

Now I am able to send the email but I have to use the glideobject as 2nd parameter. But I do not want to use that.  I do not want to use glideobject because my business logic doesn't need it. I want to use eventQueue() in a way that I pass the event name that will be fired, and some normal parameters but no glideobject. How should I write eventQueue();

View solution in original post

27 REPLIES 27

I ticked on the message sending and receiving facility. My point of concern is let us say we have an email id like sender1@mit.edu then will I be able to do. Because how can one send email from such email id without password and server things. But that is my business requirement.

Then you have done everything you can.

Recently ServiceNow have disabled the possibility to send out actual emails from PDI:s.

https://developer.servicenow.com/blog.do?p=/post/sending-emails-from-pdis/

 

what about company purchased instance. does it have this facility?

Yes, production and sub-production instances usually have email sending enabled.

thank you