Customisation question: 'From: RT_user <rt_address>'

Hi,

Can someone point me in the right direction for having the actor’s
name as the sender? I see this is done on fsck–if Jesse replies
to a ticket, I see the sender as ‘Jesse Vincent <normal_bug_address_here>’.

I checked the FAQ (mailgate and templates), Contributions and Patches pages.
I’m happy to update the wiki if someone would just direct me to the
correct place.

Thanks,
Ann

ann@drop.2organize.com wrote:

Hi,

Can someone point me in the right direction for having the actor’s
name as the sender? I see this is done on fsck–if Jesse replies
to a ticket, I see the sender as ‘Jesse Vincent <normal_bug_address_here>’.

'From: ’ - is mail header field.
Use template first lines to override it:
$u->Name; $res .= " <“. $u->EmailAddress .”>" if( $res ne
$u->EmailAddress ); $res; }

		Best regards. Ruslan.

ann@drop.2organize.com wrote:

Hi,

Can someone point me in the right direction for having the actor’s
name as the sender? I see this is done on fsck–if Jesse replies
to a ticket, I see the sender as ‘Jesse Vincent <normal_bug_address_here>’.

'From: ’ - is mail header field.
Use template first lines to override it:

What about $UseFriendlyFromLine?

By default, RT sets the outgoing mail’s “From:” header to

“SenderName via RT”. Setting this option to 0 disables it.

Set($UseFriendlyFromLine , 1);

sprintf() format of the friendly ‘From:’ header; its arguments

are SenderName and SenderEmailAddress.

Set($FriendlyFromLineFormat , “"%s via RT" <%s>”);

Michael
Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”

ann@drop.2organize.com wrote:

Duh.
I’ve changed the subjects considerably, but it didn’t occur to me to try
to change other mail headers in the same way.

Anyhow, I’m pretty sure what I want isn’t $u->EmailAddress, but
$Ticket->QueueObj->CommentAddress or $Ticket->QueueObj->CorrespondAddress.
I guess I need to construct a statement to pick the correct address,
but I’m not sure how to tell whether it is a comment or not. I checked
the methods in Transaction_Overlay, but didn’t see an appropriate one
there.
if( $Transaction->Type eq ‘Comment’ ) {

} elsif( $Transaction->Type eq ‘Correspond’ ) {

}