nelson: по Вашей перавой инструкции попробал переделать другой кусок:
if($user){
$username = $user->user_login;
$salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH);
$saltedlogin = generateHash($user->user_login);
$to = $user->user_email;
$subject = $main_smarty->get_config_vars("PLIGG_PassEmail_Subject");
$times= time();
$body = sprintf($main_smarty->get_config_vars("PLIGG_PassEmail_Body"),$main_smarty->get_config_vars("PLIGG_Visual_Name"));
$body .="\n \n";
$body .= $my_base_url . $my_pligg_base . '/recover.php?id=' . base64_encode($username). '&n=' . time();
$headers = 'From: ' . $main_smarty->get_config_vars("PLIGG_PassEmail_From") . "\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
if(phpnum()>=5)
require("libs/class.phpmailer5.php");
else
require("libs/class.phpmailer4.php");
$mail = new PHPMailer();
$mail->From = $main_smarty->get_config_vars('PLIGG_PassEmail_From');
$mail->FromName = $main_smarty->get_config_vars('PLIGG_PassEmail_Name');
$mail->AddAddress($to);
$mail->AddReplyTo($main_smarty->get_config_vars('PLIGG_PassEmail_From'));
$mail->IsHTML(false);
$mail->Subject = $subject;
$mail->CharSet = 'utf-8';
$mail->Body = $body;
мой вариант и даже страница не работает....
if($user){
$username = $user->user_login;
$salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH);
$saltedlogin = generateHash($user->user_login);
$to = $user->user_email;
$subject = $main_smarty->get_config_vars("PLIGG_PassEmail_Subject");
$times= time();
$recoverpass = my_base_url . my_pligg_base . "/recover.php?id=" .base64_encode($username). "&n=" .time();
$resetpass = "<div ......</div>"
$headers = 'From: ' . $main_smarty->get_config_vars("PLIGG_PassEmail_From") . "\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
if(phpnum()>=5)
require("libs/class.phpmailer5.php");
else
require("libs/class.phpmailer4.php");
$mail = new PHPMailer();
$mail->From = $main_smarty->get_config_vars('PLIGG_PassEmail_From');
$mail->FromName = $main_smarty->get_config_vars('PLIGG_PassEmail_Name');
$mail->AddAddress($to);
$mail->AddReplyTo($main_smarty->get_config_vars('PLIGG_PassEmail_From'));
$mail->IsHTML(true);
$mail->Subject = $subject;
$mail->CharSet = 'utf-8';
$mail->Body = $resetpass;