Is there a way to reprocess email through scheduled job?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 08:43 PM
I added a new choice field in the sys_email form which has a choice "Pending" and I want to make a scheduled job that will reprocess all email with a "Pending" status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 08:50 PM
You can have a schedule job in place which will GlideRecord the sys_email table and then reprocess the emails as per your req.
http://wiki.servicenow.com/index.php?title=Reprocess_Received_Emails#gsc.tab=0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 09:13 PM
Hi Renon,
yes ! it's possible to send notification via scheduled job.
Please refer the blog below.
Fire an email notification from a schedule job
Thanks,
Harshvardhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 01:45 AM
You can write a scheduled job with the following script to reprocess emails with Pending status.
var gr = new GlideRecord('sys_email');
gr.addQuery('u_status', 'pending'); //u_status should be your new column name and pending should be the actual internal value for choice
gr.query();
while(gr.next()){
gr.mailbox = "outbox";
gr.type = "send-ready";
gr.update();
}
Once you execute the job, all pending emails should be resend to outbox.
Thank You
Please Hit Like, Helpful or Correct depending on the impact of response