<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to set &amp;quot;Who will receive&amp;quot; through mail script? in ITSM forum</title>
    <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442784#M14563</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I want to add "Who will receive' from &amp;lt;mail_script&amp;gt;&amp;lt;/mail_script&amp;gt;. is there any way by which we can set user/group filed in "Who will receive".&lt;/P&gt;&lt;P&gt;I m writing this code as below in &amp;lt;mail_script&amp;gt; in email template. But this is not working:&lt;/P&gt;&lt;P&gt;&amp;lt;mail_script&amp;gt;&lt;/P&gt;&lt;P&gt;var gr = new GlideRecord("change_request");&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;gr.addQuery("number", current.number);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;gr.query();&lt;/P&gt;&lt;P&gt;if(gr.next())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; &amp;nbsp; var emailto=gr.requested_by.user_name+"@example.com";&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; email.setTo(emailto);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/mail_script&amp;gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jun 2014 06:13:06 GMT</pubDate>
    <dc:creator>m_servicenow</dc:creator>
    <dc:date>2014-06-20T06:13:06Z</dc:date>
    <item>
      <title>How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442784#M14563</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I want to add "Who will receive' from &amp;lt;mail_script&amp;gt;&amp;lt;/mail_script&amp;gt;. is there any way by which we can set user/group filed in "Who will receive".&lt;/P&gt;&lt;P&gt;I m writing this code as below in &amp;lt;mail_script&amp;gt; in email template. But this is not working:&lt;/P&gt;&lt;P&gt;&amp;lt;mail_script&amp;gt;&lt;/P&gt;&lt;P&gt;var gr = new GlideRecord("change_request");&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;gr.addQuery("number", current.number);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;gr.query();&lt;/P&gt;&lt;P&gt;if(gr.next())&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; &amp;nbsp; var emailto=gr.requested_by.user_name+"@example.com";&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; email.setTo(emailto);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/mail_script&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 06:13:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442784#M14563</guid>
      <dc:creator>m_servicenow</dc:creator>
      <dc:date>2014-06-20T06:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442785#M14564</link>
      <description>&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You can add Email Address in your mail script by below method&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;email.&lt;SPAN class="me1"&gt;addAddress&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="st0"&gt;"cc"&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;,&lt;/SPAN&gt; &lt;SPAN class="st0"&gt;"User's Email"&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;,&lt;/SPAN&gt;&lt;SPAN class="st0"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;email.&lt;SPAN class="me1"&gt;addAddress&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="st0"&gt;"bcc"&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;,&lt;/SPAN&gt; &lt;SPAN class="st0"&gt;"Group's Email"&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;,&lt;/SPAN&gt;&lt;SPAN class="st0"&gt;"Group Name"&lt;/SPAN&gt;&lt;SPAN class="br0"&gt;)&lt;/SPAN&gt;&lt;SPAN class="sy0"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN class="sy0"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN class="sy0"&gt;But for 'To' you can make use of parm1 and parm2 functionality of Email Notifications&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jun 2014 06:19:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442785#M14564</guid>
      <dc:creator>darshanr</dc:creator>
      <dc:date>2014-06-20T06:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442786#M14565</link>
      <description>&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Please check the below thread which will be helpful&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=ca2c8365db9cdbc01dcaf3231f96194f" title="https://community.servicenow.com/message/695278#695278"&gt;https://community.servicenow.com/message/695278#695278&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Pradeep Sharma&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:13:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442786#M14565</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2014-06-20T07:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442787#M14566</link>
      <description>&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you are triggering the email notification with an event, you can pass the recipients id as a parameter in the event call itself ie&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14032500805372037" jivemacro_uid="_14032500805372037"&gt;
&lt;P&gt;gs.eventQueue("myevent.called", current, gs.getUserID(), gs.getUserName());&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;here parm1 is gs.getUserID() and parm2 is gs.getUserName(). In the email notification, you can select the advanced view, change 'Send when' to 'Event is fired' and you can see that in the 'Who will recieve' you have these options 'parm1 has recipient', 'parm2 has recipient', you can check that to send the email to them.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;cc and &amp;nbsp; bcc can be controlled via script, you can refer this wiki link for more details:-&lt;A href="https://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#Adding_CC_and_BCC_Recipients" title="https://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#Adding_CC_and_BCC_Recipients"&gt;https://wiki.servicenow.com/index.php?title=Scripting_for_Email_Notifications#Adding_CC_and_BCC_Recipients&lt;/A&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;In a nutshell, you can use the below script add people in cc and bcc:-&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14032500849458618" jivemacro_uid="_14032500849458618"&gt;
&lt;P&gt;&amp;lt;mail_script&amp;gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; //email.addAddress(type, address, displayname);&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; email.addAddress("cc", "&lt;/SPAN&gt;&lt;A title="k-email-small" class="jive-link-email-small" href="mailto:john.copy@example.com"&gt;john.copy@example.com&lt;/A&gt;&lt;SPAN&gt;","John Roberts");&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; email.addAddress("bcc", "&lt;/SPAN&gt;&lt;A title="k-email-small" class="jive-link-email-small" href="mailto:john.secret@example.com"&gt;john.secret@example.com&lt;/A&gt;&lt;SPAN&gt;","John Roberts");&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;&amp;lt;/mail_script&amp;gt;&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jun 2014 07:43:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442787#M14566</guid>
      <dc:creator>harikrish_v</dc:creator>
      <dc:date>2014-06-20T07:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442788#M14567</link>
      <description>&lt;P&gt;HI Harish,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I am trying to send the email notification to bcc and cc but not to have an to address.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The lines you mentioned above &amp;lt;mail_script&amp;gt; email.addAddress......, should be put in the email notification body ?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:07:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442788#M14567</guid>
      <dc:creator>ryadavalli</dc:creator>
      <dc:date>2016-01-26T15:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442789#M14568</link>
      <description>&lt;P&gt;Yes in email notification body.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You can pass user sys_id as well if you dont have email ids.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:14:51 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442789#M14568</guid>
      <dc:creator>Ravi Prasad1</dc:creator>
      <dc:date>2016-01-26T15:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442790#M14569</link>
      <description>&lt;P&gt;YUp it worked, but one question is we cannot have bcc or cc without to right ?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:25:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442790#M14569</guid>
      <dc:creator>ryadavalli</dc:creator>
      <dc:date>2016-01-26T15:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442791#M14570</link>
      <description>&lt;P&gt;Never tried without To field. You just give a try. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="8_307_16_16" src="https://www.servicenow.com/8.0.1.35b65d4/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Let me know the result as I am also interested to know the result !!!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:28:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442791#M14570</guid>
      <dc:creator>Ravi Prasad1</dc:creator>
      <dc:date>2016-01-26T15:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442792#M14571</link>
      <description>&lt;P&gt;Sure. THanks Ravi. There is another question which I have related to something else. Can you please see my question to the article &lt;A title="" __default_attr="173768" __jive_macro_name="thread" class="jive_macro_thread jive_macro" data-renderedposition="10.449999809265136_829.199951171875_142_16" href="https://www.servicenow.com/community?id=community_question&amp;amp;sys_id=8e711f2ddbdcdbc01dcaf3231f961963"&gt;&lt;/A&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;THanks,&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:38:00 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442792#M14571</guid>
      <dc:creator>ryadavalli</dc:creator>
      <dc:date>2016-01-26T15:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442793#M14572</link>
      <description>&lt;P&gt;Hi Ravali,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Could you please share a screenshot from the notification body where exactly you have written the mail script in Geneva. Also if you could provide script to cc users manager would be great. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Adarsh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2016 13:50:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442793#M14572</guid>
      <dc:creator>adarsh-homepage</dc:creator>
      <dc:date>2016-07-13T13:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442794#M14573</link>
      <description>&lt;P&gt;Here is the email notification body:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Short description: ${short_description}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;${mail_script: your mail script name}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;P&gt;In the email script, you can use:&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN class="kw1"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;(function runMailScript(current, template, email, email_action, event) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; if (!current.caller_id.nil()) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var id = current.caller_id; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var user = new GlideRecord("sys_user");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; if(user.get(id))&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; if(user.manager != '')&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; email.addAddress("cc", user.manager.email, user.manager.getDisplayValue());&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;})(current, template, email, email_action, event);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN class="br0"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:22:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442794#M14573</guid>
      <dc:creator>ryadavalli</dc:creator>
      <dc:date>2016-07-13T15:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442795#M14574</link>
      <description>&lt;P&gt;On Istanbul, the "Event parm 1 contains recipient" is missing. Is this still supported. My notification is fired on an event.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2017 13:41:45 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442795#M14574</guid>
      <dc:creator>jnimmala</dc:creator>
      <dc:date>2017-08-30T13:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442796#M14575</link>
      <description>&lt;P&gt;Can you please click on the related link "Advanced view" and check again. In case you still don't see this then personalize the form layout and make sure the field is present on the form.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Aug 2017 18:29:37 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442796#M14575</guid>
      <dc:creator>Pradeep Sharma</dc:creator>
      <dc:date>2017-08-30T18:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442797#M14576</link>
      <description>&lt;P class="p1"&gt;The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: &lt;A href="https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/script/server-scripting/concept/c_ScriptingForEmailNotifications.html"&gt;&lt;SPAN class="s1"&gt;Scripting for Email Notifications&lt;/SPAN&gt;&lt;/A&gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &lt;BR /&gt; &lt;/P&gt;&lt;BR /&gt;&lt;P class="p1"&gt;Visit &lt;A _jive_internal="true" href="http://docs.servicenow.com"&gt;&lt;SPAN class="s1"&gt;http://docs.servicenow.com&lt;/SPAN&gt;&lt;/A&gt; for the latest product documentation&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Sep 2017 20:35:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442797#M14576</guid>
      <dc:creator>johnram</dc:creator>
      <dc:date>2017-09-21T20:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442798#M14577</link>
      <description>&lt;P&gt;I have a similar requirement and used a mail script to modify the email_action.recipient_users directly.&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;(function runMailScript(current, template, email, email_action, event) {
	var user = new GlideRecord('sys_user');
	user.addEncodedQuery('user_name=' + current.sys_created_by);
	user.query();
	while (user.next()){
	email.addAddress("to", user.email,user.name);
	template.print(user.name);
	email_action.recipient_users += user.sys_id+",";	
	}
})(current, template, email, email_action, event);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Mar 2018 20:12:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442798#M14577</guid>
      <dc:creator>Scott Murphy2</dc:creator>
      <dc:date>2018-03-06T20:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442799#M14578</link>
      <description>&lt;P&gt;Hi stmurphy,&lt;BR /&gt;&lt;BR /&gt;Thanks for your code sharing.&amp;nbsp; I also have a similar requirement, but I need to add an email address, instead of a user. Reason is that I need to force (and test if exists) a secondary email address.&lt;/P&gt;
&lt;P&gt;When I try to add this email to "recipient_users, it doesn't work. I tried your code (to add an email address):&lt;/P&gt;
&lt;PRE class="language-javascript"&gt;&lt;CODE&gt;email_action.recipient_users += ",test@test.com,"; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I even tried (to replace existing users/emails addresses):&amp;nbsp;&lt;BR /&gt;email_action.setValue('recipient_users',mailaddress);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paradoxaly, logging displays correctly the email address that I set by script:&amp;nbsp;&lt;BR /&gt; gs.log('resulting recipient_users : '+email_action.recipient_users);&lt;BR /&gt;&lt;BR /&gt;But when I look to sys_email, recipiends are not good (as if my code wasn't executed).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there any complementary action to apply, configuration to verify&amp;nbsp; ?&lt;BR /&gt;&lt;BR /&gt;Tried on OOB dev instance (Jakarta) and another one, unsuccesfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Arnaud&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 07:57:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442799#M14578</guid>
      <dc:creator>Allen5</dc:creator>
      <dc:date>2018-04-19T07:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442800#M14579</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;I have the same requirement of sending a&amp;nbsp;secondary OOB email to a email address "abc@gmail.com". Please help me out with this email script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Lavanya&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 07:22:53 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442800#M14579</guid>
      <dc:creator>Lavanya D</dc:creator>
      <dc:date>2020-05-27T07:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442801#M14580</link>
      <description>&lt;P&gt;Lavanya,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can only use a user account with this. If you make a user account with this email address then supply the sys_id of that user it should work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 14:19:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442801#M14580</guid>
      <dc:creator>Scott Murphy2</dc:creator>
      <dc:date>2020-05-27T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to set "Who will receive" through mail script?</title>
      <link>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442802#M14581</link>
      <description>&lt;P&gt;Lavanya,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can cc email addresses that are not users in the system by using the email object.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/script/server-scripting/reference/r_ExScptEmlNtfn.html" rel="nofollow"&gt;https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/script/server-&lt;/A&gt;&lt;A href="https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/script/server-scripting/reference/r_ExScptEmlNtfn.html" rel="nofollow"&gt;scripting/reference/r_ExScptEmlNtfn.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 14:21:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/itsm-forum/how-to-set-quot-who-will-receive-quot-through-mail-script/m-p/442802#M14581</guid>
      <dc:creator>Scott Murphy2</dc:creator>
      <dc:date>2020-05-27T14:21:54Z</dc:date>
    </item>
  </channel>
</rss>

