Client Email not sending from a UI Action

Jason Nicholas
Tera Expert

Hi

 

I have created the following code to send a email client template from a UI Action script. The email template popup works ok and the email can then be sent (once some updates are made) however although the process appears to work successfully,  no email is actually sent.

 

Any suggestions?

 

---------------------------------------------------------------------------------------------------------------------------------

function showEmail1(){
    emailClientOpenPop('request', false, null, null, 'cd8204ca1bcff110e1d8620be54bcb61');
    gsftSubmit(null, g_form.getFormElement(), "leaver_request");

}

if (typeof window == 'undefined') serverCall();
    function serverCall() {
        gs.sleep(2000);
        gs.eventQueue('leaver.email.to.sme', current);
        current.u_email_sent_to_sme = gs.nowDateTime();
        action.setRedirectURL(current);
        current.update();
}
---------------------------------------------------------------------------------------------------------------------------------
2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Jason Nicholas 

is it sending email when you normally test it?

Did you check email logs?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Jason Nicholas
Tera Expert

Hi

Yes, if I send it without the UI Action it sends OK so as a work around we are sending it first then clicking the button to update the field I have created on the incident form

Jason