Can we send only certain email notifications in TEST?

princes
Giga Contributor

We have a new solution in place and need to test only 1 notification in   TEST.   If we turn on email, everything gets sent and we can't have that happen.   Is there a way we can ONLY have this one notification go out for testing purposes and not everything in send-ready state?   I have looked at several other articles on this site, and there doesn't seem to be an easy way.   We have our user testing in Production now because that is the only way for her to receive the actual email notification - not ideal at all.   Any ideas?

3 REPLIES 3

andrew_venables
ServiceNow Employee
ServiceNow Employee

Set the following property:



glide.email.test.user   / Send all email to this test email address (non-production testing)



to an email you want to receieve ALL mail from the instance.



This will allow you to test in safety.



The easiest way to test only one notification is to deactivate them ALL except the one you want to test but that is not so easy to reverse.


princes
Giga Contributor

But we don't want all the emails in the queue to go out.....if I turn on email in TEST, they will all get sent out correct?   I need to stop that from happening...


I can't really deactivate all notifications - we have so many.   I'm not sure this solution will help me as the test user is a customer of ours and the email address is coming from a custom web form.   But thank you for trying.


Chris311
Tera Contributor

I tried adding a BR on sys_email and it appeared to be working. In my case, I simplied the condition to detecting certain text in the body. You may want to convert the entire implementation using script instead.


find_real_file.png