[rt-users] How to send a one-shot email on ticket creation
Jason Long
jlong at messiah.edu
Wed Dec 20 13:47:30 EST 2006
Thomas Dietmaier wrote:
> Hello all,
>
> I am looking for a custom scrip action to send an email to a fixed address on creation of a ticket. The recipient should not become a watcher on the ticket. I did not manage to scavenge some code from the wiki -- any pointers are much appreciated.
>
> Thanks in advance
> Thomas Dietmaier.
I had to do this. I managed to do this (using RT 3.6.1) by adding an
action called "Send Email". This is a database edit. I used an install
file like this:
# Used to install a scrip action.
#
# To install,
# execute
# /path/to/rt3/sbin/rt-setup-database --action insert \
# --datafile /path/to/SendEmailAction.install
#
@ScripActions = (
{ Name => 'Send Email',
Description => 'Sends a message to those specified in the template',
ExecModule => 'SendEmail',
Argument => '' },
);
Then create a template that looks something like this:
To: user1 at example.org, user2 at example.org
Bcc: user3 at example.org
Subject: {$Ticket->Subject}
A ticket has been created in (or moved to) this queue.
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
-------------
{$Transaction->Content()}
Finally, create a scrip for "on create", action "send email", and
specify your template. The template specifies who receives the email.
Jason
More information about the rt-users
mailing list