- 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:29 AM
Hi @dev115415 ,
Hope you are doing great . Can you please check the email properties. If the email is added where you want to get the notification if you are getting in outbox and not receiving.
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 07:00 AM
Hi @dev115415 ,
You can use the gs.eventQueue() method without object as well.
Please use the code as below:
gs.eventQueue('x_8041114_needlt.EmailEvent1','','abc@gmail.com','axyz@gmail.com');
Please mark this as correct and helpful, if it solved query and helpful alone if it lead you in right direction.
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 07:06 AM
Thank you that worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2023 07:20 AM
glad it helped you.
Mohit Kaushik
ServiceNow MVP (2023-2025)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2023 01:33 AM
I think this is not the right community for this topic.