[rt-users] How to prevent email if the ticket creation or update is not from a specific domain?
Burton Lee
burton.lee at quantil.com
Mon Nov 16 14:46:25 EST 2015
Hi,
I've been trying to figure out how to send an email to a specific address
if a ticket was created or updated by someone NOT in a company.
I tried to create a custom scrip with condition "User Defined" , action
"Notify Other Recipients", and a custom template, but I couldn't seem to
get it working right.
Any advice would be appreciated.
Thanks!
------------------------
Custom scrip:
User defined Condition:
#my $actor = $self->TransactionObj->CreatorObj;
my $actor=$self->TransactionObj->LastUpdatedByObj;
# avoid triggering email if the person updating or creating the ticket is
in the company
if ($actor->EmailAddress =~ /mycompany\.com/) {
return 0;
}
else {
return 1;
}
Custom action preparation code:
return 1;
Custom action commit code:
return 1;
-------------------------------
Custom template:
To: notification at domainxyz.com
Subject: {Ticket->Subject}
Testing conditions!
{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
{$Transaction->Content()}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20151116/196fcf74/attachment.htm>
More information about the rt-users
mailing list