<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=EmailGroup</id>
	<title>EmailGroup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=EmailGroup"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;action=history"/>
	<updated>2026-08-21T19:04:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=26370&amp;oldid=prev</id>
		<title>Tharn at 21:18, 17 August 2016</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=26370&amp;oldid=prev"/>
		<updated>2016-08-17T21:18:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:18, 17 August 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l41&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The Template ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== The Template ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;To: {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To: {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    my $GroupName = &amp;#039;IT&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    my $GroupName = &amp;#039;IT&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l71&quot;&gt;Line 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  {$Transaction-&amp;amp;gt;Content()}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  {$Transaction-&amp;amp;gt;Content()}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Don&amp;#039;t add any characters before &amp;#039;{&amp;#039; or after &amp;#039;}&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Don&amp;#039;t add any characters before &amp;#039;{&amp;#039; or after &amp;#039;}&amp;#039;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-1064:rev-26370:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Tharn</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=1064&amp;oldid=prev</id>
		<title>Admin: 5 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=1064&amp;oldid=prev"/>
		<updated>2016-04-06T20:08:52Z</updated>

		<summary type="html">&lt;p&gt;5 revisions imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:08, 6 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-1063:rev-1064 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=1063&amp;oldid=prev</id>
		<title>92.41.251.241: Added shorter example for template.</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=EmailGroup&amp;diff=1063&amp;oldid=prev"/>
		<updated>2012-07-20T20:20:52Z</updated>

		<summary type="html">&lt;p&gt;Added shorter example for template.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= RT 3.8 =&lt;br /&gt;
&lt;br /&gt;
You can use RT &amp;lt;del&amp;gt;sbin/rt-notify-group-admin&amp;lt;/del&amp;gt; &amp;lt;code&amp;gt;rt-email-group-admin&amp;lt;/code&amp;gt; to create scrip actions to notify groups and or users.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;del&amp;gt;It looks like the above script no longer exists, and instead was replaced by the concept of &amp;#039;Queue Watchers&amp;#039; at some point. See the Queue Admin page to select watchers.&amp;lt;/del&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script is in &amp;lt;code&amp;gt;RTHOME/sbin&amp;lt;/code&amp;gt; (confirmed in 3.8.6 and up to 3.8.8) and can be used to create new actions that can notify an existing Group or a group of Users. Useful when you need to notify a group only when a special condition is met (i.e. send email to users in the group Dispatchers when a new ticket is created).&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;Queue Watchers&amp;#039; feature is instead useful when you want a Group (or a User) to automatically be CC or AdminCC of each ticket that belongs to the watched queue.&lt;br /&gt;
&lt;br /&gt;
= RT 3.6 and older =&lt;br /&gt;
&lt;br /&gt;
Above script is part of an extension that has been integrated into RT 3.8. In 3.6 and older versions you can install [http://search.cpan.org/dist/RT-Action-NotifyGroup RT-Action-NotifyGroup] from CPAN.&lt;br /&gt;
&lt;br /&gt;
= Using custom code in Templates =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
This [[Template]] will email the members of an RT [[Group]]. The default template code is for when a new ticket is created, but you can change it to include whatever message you would like.&lt;br /&gt;
&lt;br /&gt;
== Author/Contributors ==&lt;br /&gt;
&lt;br /&gt;
Original author: Jeff Hoover (jhoov)&lt;br /&gt;
&lt;br /&gt;
The majority of the perl code was taken from the [[OnCreateAddGroupCc]] [[ScripAction]].&lt;br /&gt;
&lt;br /&gt;
== How To Use ==&lt;br /&gt;
&lt;br /&gt;
These instructions assume you want to be emailed when a new ticket is created:&lt;br /&gt;
&lt;br /&gt;
1. Create a new template with the code below, replacing the $[[GroupName]] variable with the name of the RT group you want to email.&lt;br /&gt;
&lt;br /&gt;
2. Create a scrip that uses the template:&lt;br /&gt;
&lt;br /&gt;
 Description: On Create Notify IT&lt;br /&gt;
   Condition: On Create&lt;br /&gt;
      Action: Notify Other Recipients&lt;br /&gt;
    Template: &amp;amp;lt;your template from step 1&amp;amp;gt;&lt;br /&gt;
       Stage: TransactionCreate&lt;br /&gt;
&lt;br /&gt;
== The Template ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;To: {&lt;br /&gt;
   my $GroupName = &amp;#039;IT&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
   # instantiate a group object&lt;br /&gt;
   my $addGroupObj = RT::Group-&amp;amp;gt;new($RT::SystemUser);&lt;br /&gt;
   $addGroupObj-&amp;amp;gt;LoadUserDefinedGroup($GroupName);&lt;br /&gt;
   return undef unless $addGroupObj;&lt;br /&gt;
   my $addGroupMembersObj = $addGroupObj-&amp;amp;gt;UserMembersObj;&lt;br /&gt;
 &lt;br /&gt;
   my $res = &amp;#039;&amp;#039;;&lt;br /&gt;
   # walk through members of group&lt;br /&gt;
   while ( my $userObj = $addGroupMembersObj-&amp;amp;gt;Next) {&lt;br /&gt;
       my $email = $userObj-&amp;amp;gt;EmailAddress;&lt;br /&gt;
       next unless $email; # email can be empty&lt;br /&gt;
 &lt;br /&gt;
      $res .= &amp;#039;, &amp;#039; if $res;&lt;br /&gt;
      $res .= $email;&lt;br /&gt;
   }&lt;br /&gt;
   $res;&lt;br /&gt;
 }&lt;br /&gt;
 RT-Attach-Message: yes&lt;br /&gt;
 &lt;br /&gt;
 A new ticket was created in the {$Ticket-&amp;amp;gt;QueueObj-&amp;amp;gt;Name} queue.&lt;br /&gt;
 &lt;br /&gt;
      Subject: {$Transaction-&amp;amp;gt;Subject || $Ticket-&amp;amp;gt;Subject || &amp;quot;(No subject given)&amp;quot;}&lt;br /&gt;
   Requestors: {$Ticket-&amp;amp;gt;RequestorAddresses}&lt;br /&gt;
  Ticket &amp;amp;lt;URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket-&amp;amp;gt;id} &amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 {$Transaction-&amp;amp;gt;Content()}&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Don&amp;#039;t add any characters before &amp;#039;{&amp;#039; or after &amp;#039;}&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Or, in RT 4 you can just use this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
To: { my $group = RT::Group-&amp;gt;new( $RT::SystemUser ); $group-&amp;gt;LoadUserDefinedGroup(&amp;quot;group name here&amp;quot;); $group-&amp;gt;MemberEmailAddressesAsString; }&lt;br /&gt;
...&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>92.41.251.241</name></author>
	</entry>
</feed>