Add the ability to supply a default "from" email address for the "forgot password" feature, instead of using the same address as for the "to".

SVN:2.0.2[3214]
This commit is contained in:
Denis Flaven
2014-06-16 15:16:43 +00:00
parent 2f1b8d2e71
commit 0e00a6c526
2 changed files with 14 additions and 0 deletions

View File

@@ -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);