[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.6-175-g8ad6d22
Alex Vandiver
alexmv at bestpractical.com
Tue Sep 9 11:21:18 EDT 2014
The branch, 4.2-trunk has been updated
via 8ad6d22aef69445c6b47274a79bf3582c34ed841 (commit)
via f9c4caf13ef2119a6366319b8ad0705128f575db (commit)
from 80bcdcfdea2988329a49bc6823f54da5d304762c (commit)
Summary of changes:
etc/RT_Config.pm.in | 2 +-
lib/RT/Interface/Email.pm | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit f9c4caf13ef2119a6366319b8ad0705128f575db
Author: Christian Loos <cloos at netcologne.de>
Date: Thu Sep 4 11:20:50 2014 +0200
Allow queue id as key for OverrideOutgoingMailFrom hash
A queue name is easily changed within the WebUI and maybe the admin forget to
also update the OverrideOutgoingMailFrom setting. It more reliable to use the
queue id instead the queue name as the hash key.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 5402c32..d43614d 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -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.
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index fc4aed1..ef939cf 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -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'}) {
commit 8ad6d22aef69445c6b47274a79bf3582c34ed841
Merge: 80bcdcf f9c4caf
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Sep 9 11:19:15 2014 -0400
Merge branch '4.2/override-outgoing-mail-from' into 4.2-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list