Template Variables - Not In FromAddress?!?

Hi,

I’m using the template from the second message in this thread
http://www.gossamer-threads.com/lists/rt/users/74122. While the problem
I’m having is not this template in general (otherwise I’d contact the
author), I have a question about the variables in FromAddress.

The original code is this:

my $FromAddress = ‘RT Requests <rt[at]myorg.org>’;
my $ContactAddress = ‘real.person[at]myorg.org’;

Now I’ve modified it to:

my $FromAddress = ‘RT Requests <$RT::CorrespondAddress>’;

my $ContactAddress = $RT::CorrespondAddress;

The $ContactAddress works fine and comes out to the correct address (as
this is used in the message body later on), however the FromAddress is
show as $RT::CorrespondAddress@MYHOSTNAME (where MYHOSTNAME is the
hostname of the server it’s running on). I can’t understand why this is.

I’ve tried moving the < and > around the address so that it has spaces
there in case that caused it. I’ve even modified the code so that it is:

my $ContactAddress = $RT::CorrespondAddress;

my $FromAddress = ‘RT Requests < $ContactAddress >’;

And the problem is still there. Can anybody help?

One other amendment I was wanting to make was to change the FromAddress
so that it reads:

my $FromAddress = ‘$Ticket->QueueObj->Description < $ContactAddress >’;

Which is what the AutoReply template uses when responding. Again this
doesn’t work and I removed it from the code so that it doesn’t
complicate things, however anybody help with this too?

Many thanks in advance.

Kind regards,

Paul Broadwith

{Blue Ivy Ltd - ICT For Small Businesses}

Hi,

I’m using the template from the second message in this thread http://www.gossamer-threads.com/lists/rt/users/74122
. While the problem I’m having is not this template in general
(otherwise I’d contact the author), I have a question about the
variables in FromAddress.

The original code is this:

my $FromAddress = ‘RT Requests <rt[at]myorg.org>’;
my $ContactAddress = ‘real.person[at]myorg.org’;

Now I’ve modified it to:

my $FromAddress = ‘RT Requests <$RT::CorrespondAddress>’;

Perl doesn’t interpolate variables in single quotes, only in double
quotes. Single quotes indicates
’this is a static string’.

my $FromAddress = “RT Requests <$RT::CorrespondAddress>”;

Please note, if you’re setting Correspond Addresses on any of your
Queues, this may not be the
correct logic

-kevin