Scrip to email on new ticket

Hi,

I’m trying to set up RT to send an email to a specified user (or email
address or group) every time a new ticket is created.

So far, I’ve created a new scrip with condition “On Create,” and action
"User Defined," but I’m having some problems trying to figure out what to
put in the custom action boxes.

Based on reading old posts and the code, I’ve been trying different
variations of the following:

Custom action preparation code:
return(1);
Custom action cleanup code:
my $self=shift;
push(@{$self->{‘To’}}, "jlevine@barenecessities.com");
return(1);

but no email is being generated, and no error messages are showing up in
the log files.

Any ideas on where to go from here? Perhaps a good reference or example?

Thanks in advance for any and all help,
Josh Levine

Hi,

I’m trying to set up RT to send an email to a specified user (or email
address or group) every time a new ticket is created.

So far, I’ve created a new scrip with condition “On Create,” and action
“User Defined,” but I’m having some problems trying to figure out what to
put in the custom action boxes.

Isn’t that what WATCHERS are made for? Configurable per Queue.
Stefan Seiz http://www.stefanseiz.com
Spamto: bin@imd.net

Hi,

I’m trying to set up RT to send an email to a specified user (or email
address or group) every time a new ticket is created.

So far, I’ve created a new scrip with condition “On Create,” and action
“User Defined,” but I’m having some problems trying to figure out what
to put in the custom action boxes.

Isn’t that what WATCHERS are made for? Configurable per Queue.

I only want the user to receive an email when the ticket is opened - not
on every comment or response. I’m sure it’s a real simple code
fragment…if someone can just point me in the right direction, I’d
really apppreciate it.

–Josh Levine

I’m trying to set up RT to send an email to a specified user (or email
address or group) every time a new ticket is created.

Isn’t that what WATCHERS are made for? Configurable per Queue.

I only want the user to receive an email when the ticket is opened - not
on every comment or response.

Watchers don’t automatically get mail. So you could set them up as a
AdminCC for the queue, then mail the adminccs on create, and no other
time. (but maybe you want to use AdminCC for something else)

seph

seph wrote:

I’m trying to set up RT to send an email to a specified user (or email
address or group) every time a new ticket is created.

Isn’t that what WATCHERS are made for? Configurable per Queue.

I only want the user to receive an email when the ticket is opened - not
on every comment or response.

Watchers don’t automatically get mail. So you could set them up as a
AdminCC for the queue, then mail the adminccs on create, and no other
time. (but maybe you want to use AdminCC for something else)

That’s actually a very good idea - thanks. I will probably end up on
doing that, but for future reference, are there any examples of code
used for a custom action?

Thanks again,
Josh Levine