f2885406 by Carlos Garcia

Fixed bug#12650 - SendCustomerNotification does not respect newly assigned mail …

…address. Thanks to S7.
1 parent 9e9493e7
#6.0.0.beta1 2017-??-??
- 2017-03-26 Fixed bug#[12650](https://bugs.otrs.org/show_bug.cgi?id=12650)(PR#1636) - SendCustomerNotification does not respect newly assigned mail address. Thanks to S7!
- 2017-03-24 Fixed bug#[12720](https://bugs.otrs.org/show_bug.cgi?id=12720)(PR#1672) - Settings window of Complex LinkObject is not translated. Thanks to S7!
- 2017-03-24 Modernized address book. It is now possible to search for all configured custom user and customer fields.
- 2017-03-21 Fixed bug#[12188](https://bugs.otrs.org/show_bug.cgi?id=12188)(PR#1661) - Dashboard stats do not refresh automatically. Thanks to S7!
......
......@@ -18,6 +18,7 @@ use Kernel::System::VariableCheck qw(:all);
our @ObjectDependencies = (
'Kernel::Config',
'Kernel::System::CustomerUser',
'Kernel::System::CheckItem',
'Kernel::System::DB',
'Kernel::System::DynamicField',
'Kernel::System::DynamicField::Backend',
......@@ -775,8 +776,21 @@ sub _RecipientsGet {
);
# join Recipient data with CustomerUser data
%Recipient = ( %Recipient, %CustomerUser );
# Check if customer user is email address, in case it is not stored in system
if (
!IsHashRefWithData( \%CustomerUser )
&& !$ConfigObject->Get('CustomerNotifyJustToRealCustomer')
&& $Kernel::OM->Get('Kernel::System::CheckItem')
->CheckEmail( Address => $Article{CustomerUserID} )
)
{
$Recipient{UserEmail} = $Article{CustomerUserID};
}
else {
# join Recipient data with CustomerUser data
%Recipient = ( %Recipient, %CustomerUser );
}
# get user language
if ( $CustomerUser{UserLanguage} ) {
......
......@@ -31,6 +31,16 @@ $ConfigObject->Set(
Value => 'Kernel::System::Email::DoNotSendEmail',
);
# disable dns lookups
$ConfigObject->Set(
Key => 'CheckMXRecord',
Value => 1,
);
$ConfigObject->Set(
Key => 'CheckEmailAddresses',
Value => 1,
);
# test scenarios
my @Tests = (
{
......