- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 03:48 AM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 09:56 AM - edited ‎06-01-2023 01:15 AM
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();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 11:14 AM
In the previous question you asked about changing the sender of the email.
Now I believe you are asking about configuring the receiver of the email, which can be done in another section (Who will receive) of the notification
I'm not following on how you mean by "send from a gmail", do you mean you want to send the email to a gmail address?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 11:26 AM
I want to send email from a gmail account say sender1@gmail.com to receiver1@gmail.com

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 11:52 PM
You can change all the required details in the notification you've created.
See example images below.
Do note, that for the emails to actually be sent from your PDI, you will need to activate email sending and receiving in your PDI, otherwise the email is only available in the instance by navigating to:
System Mailboxes > Sent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-29-2023 11:55 PM
Hello I have done all this and my mails are coming in sent tab of ServiceNow also. But I am not receiving these mails to my actual mail id. What to do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2023 12:28 AM
Hi @dev115415,
You are performing all these operations in your PDI? If yes then email notifications are disabled in PDIs by ServiceNow. If you are able to see the notifications in your sent box that means the emails are getting triggered and the same will work in your company instance properly.
Please mark this answer as correct and helpful, if it solved your query.
Mohit Kaushik
ServiceNow MVP (2023-2025)