Email launched by event not working.

santrym
Mega Expert

I'm really puzzled. I have an event triggered email working in our Dev environment, but I cannot get it to work in the Test environment. I have checked the even log, and the events are being triggered, but then when I check the email log, there is nothing there. My email notification is supposed to be triggered by the even seen in the log, but nothing is happening. Is there any known issues with firing emails from events? Any ideas of what I should check? I feel like I've tried everything. Any advice/thoughts would be appreciated. Thanks

1 ACCEPTED SOLUTION

santrym
Mega Expert

Turns out the issue was that when I passed an inactive user as a parameter, nothing would be sent, even if the user record had an email address. To get around this, I just passes the user's email as the parameter.


View solution in original post

13 REPLIES 13

Aakash Shah4
Tera Guru

Hi Michael,



Check for the email properties. is the email configuration proper in your Test environment. Is the email sending and receiving enabled.


Check this link for more details on this



https://docs.servicenow.com/bundle/istanbul-servicenow-platform/page/administer/reference-pages/conc...


treycarroll
Giga Guru

Hi Michael,



I would go back to the basics and just run down the list.



*** Check to make sure that the event is registered in your test instance. An unregistered event will show up in the event logs, but will not trigger any response.



* Open up the notification in list view and add all columns in both dev and test and then check every field to see if the notification came across in your update set verbatim.



* Give special attention to the condition on the notification to ensure that it is set to fire when the event is triggered, (look at it under advanced view and inspect "Send When" to ensure that it is set to "Event is Fired").   Then check to ensure that it is connected to the correct event.



* Make sure that there are no errors in a mail script.



* Inspect mail settings > Outbound mail settings > Email sending enabled (true)



Regards,



Trey Carroll


I guess I'm not sure what you mean by "make sure that the event is registered in your test instance". So My scheduled job calls:



                  gs.eventQueue('mobile_reimbursement_inactivation_email', grInactives, grInactives.u_requester, '');



I have checked to make sure these parameters are valid. I have checked in the "Event Registry" table, and the event is in there (I have checked to make sure the string 'mobile_reimbursement_inactivation_email' is the same in both event name and in the method I called above.



I have also checked to make sure the event name is the same as the event being hit in the code above.



Really baffled by this. I could be doing something really dumb, but I've been going over everything and I still can't figure it out...


Hi Michael,



And do you see an entry for your event within the Event Log ? That is found at System Logs >> Events



Thanks,


Berny