Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Send Email Event parm 1 contains recipient

jinwoolee
Tera Contributor

Hello, when emailing through the event queue, if the email address is the same as the trigger user's email, I don't get an email. How can I set it up?

1 ACCEPTED SOLUTION

Dinesh Chilaka
Kilo Sage

Hi @jinwoolee ,

Here the issue is When we check the Event param1 contains recipient,we need to pass the sys_id of the user as the param1.

But in your script you are passing email Address of the user ,make that small change in your script,

var gr = new GlideRecord('sc_req_item');
    if (gr.get(ritmId)) {

       // var gr2 = new GlideRecord("sys_user");
     //   gr2.get(gr.request.requested_for.toString());

        //var emailAddr = gr2.getValue("email");

        event = "krfton.pickup.ready.ko";

        gs.log("emailAddr : " + emailAddr);

        gs.eventQueue(
            event,
            gr,
            gr.request.requested_for.toString()
            ''
        );

 If my response helped, mark it as helpful and accept the solution.

View solution in original post

1 REPLY 1

Dinesh Chilaka
Kilo Sage

Hi @jinwoolee ,

Here the issue is When we check the Event param1 contains recipient,we need to pass the sys_id of the user as the param1.

But in your script you are passing email Address of the user ,make that small change in your script,

var gr = new GlideRecord('sc_req_item');
    if (gr.get(ritmId)) {

       // var gr2 = new GlideRecord("sys_user");
     //   gr2.get(gr.request.requested_for.toString());

        //var emailAddr = gr2.getValue("email");

        event = "krfton.pickup.ready.ko";

        gs.log("emailAddr : " + emailAddr);

        gs.eventQueue(
            event,
            gr,
            gr.request.requested_for.toString()
            ''
        );

 If my response helped, mark it as helpful and accept the solution.