Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 02:30 PM
Hi,
I have tested some functionality on Dev and want to enable outgoing emails but there are pilled up emails which should not be sent out.
What is your suggestion? Delete them or change their status to something so they can be ignored? What script background should be used?
Can I use below script to prevent sending the emails existing already in the system?
var rec = new GlideRecord('sys_email');
rec.addQuery('type','send-ready');
rec.query();
while (rec.next()) {
rec.type = 'send-ignored';
rec.update();
}
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 07:37 PM
Both of the above "processed, send-gnore" is fine. Sytem will only pick sent ready emails for sending out.
You can use the code which you shared, it will prevent the emails from sending out.
-satheesh
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 07:37 PM
Both of the above "processed, send-gnore" is fine. Sytem will only pick sent ready emails for sending out.
You can use the code which you shared, it will prevent the emails from sending out.
-satheesh