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: [EMAIL PROTECTED], [EMAIL PROTECTED]
Bcc: [EMAIL PROTECTED]
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
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to