Skip to content

Commit

Permalink
OverrideOutgoingMailFrom: Use $CorrespondAddress if the queue's isn't…
Browse files Browse the repository at this point in the history
… set

Otherwise the meaning of the Default key changes depending on the
queue's correspond address being set or not.  Using the global
correspond address for queues with no specific correspond address, as
well as moving the Default check into the else branch, means the Default
key is only used when there's no ticket involved.  This is the
documented behaviour in RT_Config.pm.
  • Loading branch information
tsibley committed Sep 12, 2012
1 parent ed972f0 commit 79a039f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/RT/Interface/Email.pm
Expand Up @@ -420,12 +420,13 @@ sub SendEmail {
if ($QueueAddressOverride) {
$OutgoingMailAddress = $QueueAddressOverride;
} else {
$OutgoingMailAddress = $TicketObj->QueueObj->CorrespondAddress;
$OutgoingMailAddress = $TicketObj->QueueObj->CorrespondAddress
|| RT->Config->Get('CorrespondAddress');
}
} else {
$OutgoingMailAddress ||= RT->Config->Get('OverrideOutgoingMailFrom')->{'Default'};
}

$OutgoingMailAddress ||= RT->Config->Get('OverrideOutgoingMailFrom')->{'Default'};

push @args, "-f", $OutgoingMailAddress
if $OutgoingMailAddress;
}
Expand Down

0 comments on commit 79a039f

Please sign in to comment.