diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index b8293e099..c5fde0d65 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -240,6 +240,11 @@ class LoginWebPage extends NiceWebPage $oEmail = new Email(); $oEmail->SetRecipientTO($sTo); + $sFrom = MetaModel::GetConfig()->Get('forgot_password_from'); + if ($sFrom == '') + { + $sFrom = $sTo; + } $oEmail->SetRecipientFrom($sTo); $oEmail->SetSubject(Dict::S('UI:ResetPwd-EmailSubject')); $sResetUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?loginop=reset_pwd&auth_user='.urlencode($oUser->Get('login')).'&token='.urlencode($sToken); diff --git a/core/config.class.inc.php b/core/config.class.inc.php index b7c403959..0b3eea503 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -548,6 +548,15 @@ class Config 'source_of_value' => '', 'show_in_conf_sample' => false, ), + 'forgot_password_from' => array( + 'type' => 'string', + 'description' => 'Sender email address for the "forgot password" feature. If empty, defaults to the recipient\'s email address.', + // examples... not used (nor 'description') + 'default' => '', + 'value' => '', + 'source_of_value' => '', + 'show_in_conf_sample' => false, + ), 'deadline_format' => array( 'type' => 'string', 'description' => 'The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$',