[rt-users] Alter "From" field in template

Giuseppe Sollazzo gsollazz at sgul.ac.uk
Wed Jun 26 04:22:24 EDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Kevin,

On 25/06/13 20:03, Kevin Falcone wrote:
>    The structure of my script follows.
>
> I'm assuming everywhere you say "Script" you mean "Template".

erm yes. I have this bad habit of calling the perl part of a template "a
script". Sorry!
>
>
> If you want to change headers, they have to go at the top.  Look at
> your code, it inserts a newline and $Transaction->Content.
>
> I'm betting the mail goes out with a trailing From: at the bottom.
>
> Put your From: first.  Templates are like emails, Headers, blank line,
> body.

Of course. They're headers so they need to go before the body! Don't
know why I didn't think of it.

Many thanks,
G

>
>
>>    Subject: { if ($Ticket->QueueObj->Name eq 'Z')
>>    { "Z Support Job Logged: " . $Ticket->Subject . "
>>    Thank you for contacting Z.
>>   
-------------------------------------------------------------------------
>>    Initial request details:
>>    " . $Transaction->Content . "
>>    ";}
>>    elsif ($Ticket->QueueObj->Name eq 'W')
>>    {...}
>>    From: { if ($Ticket->QueueObj->Name eq 'Z')
>>    { "z at sgul.ac.uk";}
>>    elsif ($Ticket->QueueObj->Name eq 'W')
>>    { "w at sgul.ac.uk";}
>>    else
>>    { "support at sgul.ac.uk";
>>    }


- -- 
____________________________________

Giuseppe Sollazzo
Senior Systems Analyst
Computing Services
Information Services
St. George's, University Of London
Cranmer Terrace
London SW17 0RE

Email: gsollazz at sgul.ac.uk
Direct Dial: +44 20 8725 5160
Fax: +44 20 8725 3583
Twitter: http://twitter.com/sgulit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEcBAEBAgAGBQJRyqTAAAoJEAqigArPBfJXpQEH/1+9drpXZHDhyqQUnXuBO4oy
IXkaAE2dUTpyWANAde+TCNRrlnjAFGx4MHz2yqFoKohnCZSLdGjL4FyU06+lOX78
CfbYQgjPVy0Tqlj5p5tpT+sdsCTBvu+weB0SGTOgmkPidSkvYBKYGLIfp99xSbaM
I/un8xCK0x9l+ifxMfwQzsEVx5X0SsAS+3x30GQ5buPWQzSeyWeGh5KvYMwYINew
eF/cIDh5pgEfLg+yaFBtoppN0J/UQ3IPEnZstNrj+LyUs83773GmCM6yMHK9CIkO
y+eJeT3j/K3ZArOyAxbZeGvcNSN25V6fBj+TDggOZR7M9hSLxeVEUXjSLhKeKRc=
=INcL
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xCF05F257.asc
Type: application/pgp-keys
Size: 1744 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130626/c635bc71/attachment.key>


More information about the rt-users mailing list