>>> On Wed, Aug 22, 2007 at 4:40 PM, in message
<[EMAIL PROTECTED]>, Gene LeDuc
<[EMAIL PROTECTED]> wrote:
> In your template you get the value of the field with:
> my $bldg = $Ticket- >FirstCustomFieldValue('Building');
> Then you do the e- mail:
> $OUT = "From: $from_address
> To: $addresslist
> Subject: $subject
>
> Boilerpalte text goes here.
> ";
Gene,
Is there something magic about $from_address and $subject or do I need to
create those variables? I'm assuming that I can't use the built-in RT templates
for those since I'm adding all this perl to the template.
My template now looks like this:
my $bldg = $Ticket->FirstCustomFieldValue('Building');
my $group = RT::Group->new( $RT::SystemUser );
$group->LoadUserDefinedGroup("SupportTeam-$group");
my $addresslist = $group->MemberEmailAddressesAsString;
$OUT = "From: $from_address
To: $addresslist
Subject: $subject
This is a test message.
";
This isn't working, and I get the following error in the RT log:
Aug 22 22:37:43 support RT: error: couldn't parse head; error near: my $bldg
= $Ticket->FirstCustomFieldValue('Building'); my $group = RT::Group->new( $RT::S
ystemUser ); $group->LoadUserDefinedGroup("SupportTeam-$group"); my $addresslist
= $group->MemberEmailAddressesAsString; (/usr/local/rt3/lib/RT/Template_Overlay
.pm:336)
So obviously the message isn't being generated correctly. I've been scouring
the wiki looking for other template examples that use this sort of method, but
I'm not having much luck making sense of them. Any help would be greatly
appreciated.
-Tim
--
Tim Wilson, Director of Technology
Buffalo-Hanover-Montrose Schools
214 1st Ave NE Buffalo, MN 55313
ph: 763.682.8740 fax: 763.682.8743 http://www.buffalo.k12.mn.us
_______________________________________________
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