Browse Source

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".

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3213 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 11 năm trước cách đây
mục cha
commit
0fca79fcb7
2 tập tin đã thay đổi với 14 bổ sung0 xóa
  1. 5 0
      application/loginwebpage.class.inc.php
  2. 9 0
      core/config.class.inc.php

+ 5 - 0
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);

+ 9 - 0
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$',