<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=EmailTemplate_send</id>
	<title>EmailTemplate send - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=EmailTemplate_send"/>
	<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=EmailTemplate_send&amp;action=history"/>
	<updated>2026-04-20T08:27:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=EmailTemplate_send&amp;diff=240451&amp;oldid=prev</id>
		<title>Administrator: Created page with &quot;{{HelpFiles}}  ==== EmailTemplate_send====  send mail by an existing mail template  &#039;&#039;&#039;Syntax&#039;&#039;&#039;  EmailTemplate_send(mailTemplateId, isTest, toEmail, alias ) - Send mail from...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=EmailTemplate_send&amp;diff=240451&amp;oldid=prev"/>
		<updated>2022-05-12T07:09:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{HelpFiles}}  ==== EmailTemplate_send====  send mail by an existing mail template  &amp;#039;&amp;#039;&amp;#039;Syntax&amp;#039;&amp;#039;&amp;#039;  EmailTemplate_send(mailTemplateId, isTest, toEmail, alias ) - Send mail from...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{HelpFiles}}&lt;br /&gt;
&lt;br /&gt;
==== EmailTemplate_send====&lt;br /&gt;
&lt;br /&gt;
send mail by an existing mail template&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Syntax&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias ) - Send mail from current QAS context&lt;br /&gt;
&lt;br /&gt;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod) - Send mail from parent&lt;br /&gt;
&lt;br /&gt;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, ccEmails, bccEmails, parentId, fromEmail, callbackMethod) - Send multiple mails. Notice CC/BCC mails are not available if isTest = true&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Arguments&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;mailTemplateId&amp;#039;&amp;#039;: number - is RId of the mail template&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;isTest&amp;#039;&amp;#039;: bool - Send as test mail or not&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;toEmail&amp;#039;&amp;#039;: string - is email address of receiver&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;alias&amp;#039;&amp;#039;: string - is alias of receiver&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ccEmails&amp;#039;&amp;#039;: array - are CC email address &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;bccEmails&amp;#039;&amp;#039;: array - are BCC email address&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;parentId&amp;#039;&amp;#039;: number - is RId of resource that contain these mail in communication tab after sending. Set empty to use questionnaire of current QAS context&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;fromEmail&amp;#039;&amp;#039;: string - From email address. Set empty to use default mail of parent&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;callbackMethod &amp;#039;&amp;#039;: function(subject, message) - use to update mail subject, content before send. Set empty to ignore&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Return type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Empty&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
number mailTemplateId = 17148149;&lt;br /&gt;
bool isTest = false;&lt;br /&gt;
string toEmail = &amp;quot;email@...&amp;quot;;&lt;br /&gt;
string alias = &amp;quot;Alias&amp;quot;;&lt;br /&gt;
//array ccEmails = {&amp;quot;email@...&amp;quot;, ...};&lt;br /&gt;
//array bccEmails = {&amp;quot;email@...&amp;quot;, ...};&lt;br /&gt;
number parentId = 17148159; //empty to use questionnaire of current QAS context&lt;br /&gt;
string fromEmail = &amp;quot;panel@...&amp;quot;; //empty to use default EmailAccount of parent&lt;br /&gt;
object callbackMethod = function (string subject, string message){//empty to ignore&lt;br /&gt;
	subject = &amp;quot;Test&amp;quot; + getRandomNumber(0,10); &lt;br /&gt;
	return {subject, message};&lt;br /&gt;
};&lt;br /&gt;
//EmailTemplate_send(mailTemplateId, isTest, toEmail, alias);&lt;br /&gt;
EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, parentId, fromEmail, callbackMethod);&lt;br /&gt;
//EmailTemplate_send(mailTemplateId, isTest, toEmail, alias, ccEmails, bccEmails, parentId, fromEmail, callbackMethod);&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
[[Category:Email_and_SMS_Functions]]&lt;/div&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
</feed>