Commit 8ad6d22a authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Merge branch '4.2/override-outgoing-mail-from' into 4.2-trunk

parents 80bcdcfd f9c4caf1
......@@ -565,7 +565,7 @@ address of the queue as it is handed to sendmail -f. This helps force
the From_ header away from www-data or other email addresses that show
up in the "Sent by" line in Outlook.
The option is a hash reference of queue name to email address. If
The option is a hash reference of queue id/name to email address. If
there is no ticket involved, then the value of the C<Default> key will
be used.
......
......@@ -440,14 +440,15 @@ sub SendEmail {
my $Overrides = RT->Config->Get('OverrideOutgoingMailFrom') || {};
if ($TicketObj) {
my $QueueName = $TicketObj->QueueObj->Name;
my $QueueAddressOverride = $Overrides->{$QueueName};
my $Queue = $TicketObj->QueueObj;
my $QueueAddressOverride = $Overrides->{$Queue->id}
|| $Overrides->{$Queue->Name};
if ($QueueAddressOverride) {
$OutgoingMailAddress = $QueueAddressOverride;
} else {
$OutgoingMailAddress ||= $TicketObj->QueueObj->CorrespondAddress
|| RT->Config->Get('CorrespondAddress');
$OutgoingMailAddress ||= $Queue->CorrespondAddress
|| RT->Config->Get('CorrespondAddress');
}
}
elsif ($Overrides->{'Default'}) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment