Email is not sending when ticket is not created in inbound action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 03:47 AM
var senderEmail = email.from; var domains = senderEmail.split('@')[1]; var contactGr = new GlideRecord('abc_contact'); contactGr.addQuery('email', senderEmail); contactGr.query(); if (contactGr.hasNext()) { createTicket(current, email, true); } else { var domainUserGr = new GlideRecord('abc_contact'); domainUserGr.addEncodedQuery('emailCONTAINS' + domains); domainUserGr.addActiveQuery(); domainUserGr.query(); var allowCreation = false; //checking Support plan while (domainUserGr.next()) { if (domainUserGr.getValue('abc_plan') != 'no') { allowCreation = true; break; } } if (allowCreation) { createTicket(current, email, false); } else { var domainExists = checkDomainInContactTable(domains); if(!domainExists){ gs.eventQueue('external.customer.csm.not.verified', current, senderEmail); current.setAbortAction(true); } else{ gs.eventQueue('external.customer.csm.not.verified', current, senderEmail); current.setAbortAction(true); } } }
The condition were working as per the above configuration but the ticket creation was ignored we are supposed to send an email. In reality the email is not triggering to senderEmail when the ticket creation is ignored.
Please help me on this
Regards,
Joyal Robert