Error in mail notification template


#1

hi friends

I use this template for mail notification and it works but when i want to set set my url in this sript gives this error like this:
To:sh.haghi@pishro.computer,
RT-Attach-Message: yes

A new ticket has been created in the {$Ticket->QueueObj->Name} queue. Details are as follows:

Ticket #: {$Ticket->id}
 Created: {$Transaction->CreatedAsString}

Transaction: {$Transaction->Description}
Queue: {$Ticket->QueueObj->Name}
Subject: {$Transaction->Subject || $Ticket->Subject || “(No subject given)”}
Owner: {$Ticket->OwnerObj->Name}
Requestors: {$Ticket->RequestorAddresses}
Status: {$Ticket->Status}
Ticket <URL: {$RT::yahoo.com}/Ticket/Display.html?id={$Ticket->id} >

{my $out = “”;
$out = $Transaction->Content() unless $Transaction->Content() eq “This transaction appears to have no content”;
$out;
}

error :Couldn’t compile template codeblock ‘$RT::yahoo.com’: Bareword “com” not allowed while “strict subs” in use at template line 14

could you help me plzzz !!!


#2

Well the error is pretty clear: there’s isn’t a method in the RT object called “yahoo” and in addition the “.com” just makes it invalid Perl. Not sure what you’re trying to do with this method call to be honest - looks like you might have accidentally pasted “yahoo.com” over the top of an actual RT library method name?


#3

The URL should be like this:

Ticket URL:{RT->Config->Get(“WebURL”)}Ticket/Display.html?id={$Ticket->id}