[rt-users] Email Notification On Create

Gene LeDuc gleduc at mail.sdsu.edu
Mon Aug 13 17:29:44 EDT 2007

Hi Seb,

Try this.
1.  Create a template (Templates | New template) in the queue that you are 
working with.  Call it "NotifyTeamNewTicket".  Paste everything between the 
2 "=====" lines below into the Content box:
{ ### Sends e-mail to team when new ticket is created
   my $TeamAddress = 'teamaddress at yourcompany.com';
   my $FromAddress = 'RT <rt at yourcompany.com>';
   my $ticketid = $Ticket->Id;
   my $queue = $Ticket->QueueObj->Name;
   my $TicketURL = $RT::WebURL . "Ticket/Display.html?id=$ticketid";
   $OUT = "From: $FromAddress
To: $TeamAddress
Subject: New RT ticket: $queue / $ticketid

This is message is to notify you that a new ticket (#$ticketid) has been 
created in the $queue queue.  You can access it at the following URL:

Have a nice day,
Your Friendly RT ticketing system

2.  Change the $FromAddress and $TeamAddress values in the template as 
appropriate.  While you're at it, change the wording of the subject line 
and message body to reflect what you want to say.  DO NOT REMOVE the blank 
line after Subject:!  Don't leave any blank lines before the code in front 
of the code in the  Content box.

3.  Create a scrip in your queue (Scrips | New scrip).  Use 
"NotifyTeamNewTicket" for the description.  Make the condition "On 
Create".  Make the Action "Notify Other Recipients".  Set the Template to 
"NotifyTeamNewTicket".  The Stage should be "TransactionCreate".  Leave the 
boxes under "User Defined conditions and actions" empty.

Try it out!

Good luck,

At 01:31 PM 8/13/2007, sebsua at gmail.com wrote:
>We been looking to get RT to send an email to an specific email
>address only when a ticket is created, and not adding it to CC,
>AdminCC, etc.-
>Basically this is to notify the Team when they are mobile.
>Browsing the Wiki i notice a cpl of conditions that gets and email
>address into CC, we only want to pull and email out and do not modify
>that Ticket at all.
>BTW we are not very used to RT Scripts....

Gene LeDuc, GSEC
Security Analyst
San Diego State University 

More information about the rt-users mailing list