UseActorAsSender

From Request Tracker Wiki
Revision as of 16:39, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To change the from header, you will need to modify your template to add the replacement 'from' to the top of the template. This example will use your normal reply address, but will use the name of the person making the transaction for the name portion. Thus if your mail is normally from 'RT system <rt@mydomain.org>', and 'J. User <j.user@mydomain.org>' adds to a ticket, the mail will appear to be from 'J. User <rt@mydomain.org>'.

From: {
  my $u = $Transaction->CreatorObj;
  my $a = $Ticket->QueueObj->CorrespondAddress;
  $a = $Ticket->QueueObj->CommentAddress if ( $Transaction->Type eq 'Comment' );
  my $res = $u->RealName || $u->Name;
  $res .= " <".$a .">" ;
$res; }

Of course you may well prefer to use UseFriendlyFromLine instead, but I have included this to give an example of replacing the from header.