Email: Clear Outbox Queue Before Checking "Email sending enabled"

Desmo
Mega Guru

Hi,

I need to turn-on / enable "Email sending enabled" (Email Properties > Email sending enabled) on a non-production instance, but don't want to send emails in the Outbox queue. There are over 1000 emails in Ready state.

What is the most efficient method skipping or ignoring emails in the outbox? Business rule, perhaps. If you can provide a script, I'd greatly appreciate it.

Thanks,

Charlie

10 REPLIES 10

Do I need to have the "email sending enabled" setting checked to receive the emails in Dev - or will it send it to everyone.


find_real_file.png


mike_zelnik
ServiceNow Employee
ServiceNow Employee

Anthony,



That is the master switch for enabling sending on the instance.   You need it checked for any emails to be sent.   If you have it enabled, then ALL (type = send-ready) emails will be sent to the test email address you have defined in the next field.



R,
Mike


For receiving email, You can just activate inbound email.


find_real_file.png


I need to do this on a production instance because of an update to a table that would shoot off a lot of emails that would just be noise. My question is if I set a test email address, then do the update, and then remove the email when the update is complete. Will it go back to sending emails to users without the emails that were generated when the test email was in there correct? Or will it que everything and send it to them once it is removed?

MGanon
Tera Guru

I just opened the sys_email (sys_email.list from the navigator) table, selected the Update All option, then set all emails to send-ignore. Similar to the script that Mike Zelnik created but much easier.