Fix: le lien de confirmation ne s'affichait pas correctement et le FROM n'était pas défini

This commit is contained in:
Regis Houssin 2007-06-02 08:43:14 +00:00
parent 984e9d3641
commit c2b5478cea
2 changed files with 21 additions and 21 deletions

View File

@ -1087,7 +1087,7 @@ class User
*/ */
function send_password($user, $password='', $changelater=0) function send_password($user, $password='', $changelater=0)
{ {
global $langs; global $conf,$langs;
require_once DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"; require_once DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php";
@ -1117,11 +1117,11 @@ class User
$mesg.= "\n"; $mesg.= "\n";
$mesg.= "You must click on the folowing link to validate its change.\n"; $mesg.= "You must click on the folowing link to validate its change.\n";
$url = "http://".$_SERVER["HTTP_HOST"].DOL_URL_ROOT.'/user/passwordforgotten.php?action=validatenewpassword&username='.$this->login."&passwordmd5=".md5($password); $url = "http://".$_SERVER["HTTP_HOST"].DOL_URL_ROOT.'/user/passwordforgotten.php?action=validatenewpassword&username='.$this->login."&passwordmd5=".md5($password);
$mesg.= '<a href="'.$url.'">Validate my new password</a>'."\n\n"; $mesg.= $url."\n\n";
$mesg.= "If you didn't ask anything, just forget this email\n\n"; $mesg.= "If you didn't ask anything, just forget this email\n\n";
dolibarr_syslog("User::send_password url=".$url); dolibarr_syslog("User::send_password url=".$url);
} }
$mailfile = new CMailFile($subject,$this->email,$conf->email_from,$mesg, $mailfile = new CMailFile($subject,$this->email,$conf->notification->email_from,$mesg,
array(),array(),array(), array(),array(),array(),
'', '', 0, $msgishtml); '', '', 0, $msgishtml);