diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index e25e2eb29..1ebd34a80 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -244,6 +244,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 dc0f3bab1..e9388d13d 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -549,6 +549,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$',