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.
Dataphone GmbH
Ottakringer Strasse 54, A-1170 Wien
Tel. +43-(0)1-406 74 45-25
thomas.dietmaier@dataphone.at
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@example.org, user2@example.org
Bcc: user3@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
-----Original Message-----
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@example.org, user2@example.org
Bcc: user3@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
I don’t think you need to create a database entry for the action - we’ve
done similar by a scrip like this:
On Create Notify Other Recipients using template whatever
As in Jason’s example, the template has the email addresses hard-coded at
the top.
Steve
Stephen Turner
Senior Programmer/Analyst - Client Support Services
MIT Information Services and Technology (IS&T)
Extension RTx-Notify-Group as well works for users. It’s available
from the CPAN. I’m not saying that solution with hacking a template
doesn’t work, but I really don’t think it’s good idea to store this
info inside a template.On 12/19/06, Thomas Dietmaier Thomas.Dietmaier@dataphone.at 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.
–
Dataphone GmbH
Ottakringer Strasse 54, A-1170 Wien
Tel. +43-(0)1-406 74 45-25
thomas.dietmaier@dataphone.at
The rt-users Archives
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
Best regards, Ruslan.