Ok i tried the code out and i still get the line error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/pantheraonline.com/account.php on line 123
I used this source code as above
case 'lost_password':
// include_once('class.phpmailer.php');
$host = "host";
$username = "noreply@noreply.com";
$password = "password";
// Set the default title
$phpfox_page_title = "Lost Password";
define("PHPFOX_NOTOP",TRUE);
$phpfox_build = array(
'FORM' => phpfox_links("account","lost_password"),
);
$phpfox_replace['email_verify'] = TRUE;
function phpfox_randomzie()
{
$array = array(
"ap","dus","tin","rog","sti","rev","pik","sty","lev","qot","rel","vid",
"kro","xo","pro","wia","axi","jer","foh","mu","ya","zol","gu","pli","cra",
"den","bi","sat","ry","qui","wip","fla","gro","tav","peh","gil","lot",
"kal","zan","noc","bat","tev","lun","pal","hom","cun","wos","vox"
);
$rand = rand(0,count($array));
return $array[$rand];
}
if ( !empty($_POST['email']) )
{
$email_check = phpfox_sql_query("user","`email`,`user`,`id`","WHERE `email` = '$PHPFOX_POST[email]'",TRUE);
if ( $email_check['email'] )
{
$new_pass = rand(23,30).phpfox_randomzie().rand(23,9873).phpfox_randomzie();
phpfox_sql_update("user","SET `new_pass` = '$new_pass' WHERE `email` = '". $email_check['email'] ."'");
$from = "Panthera Online | The Best Online Community! <noreply>";
$to = $PHPFOX_POST[email] '<PHPFOX_POST> $from, 'To' => $to, 'Subject' => $subject);
$smtp = Mail::factory('smtp', array('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password));
$mail = $smtp->send($to, $headers, $body);
// mail(trim($email_check['email']),$phpfox_lang['lost_password'],$message,trim($GLOBALS['phpfox_main_config']['email_headers']));
$phpfox_replace['email_verify'] = FALSE;
$phpfox_replace['email_verify_sent'] = TRUE;
$phpfox_build['lost_password_verify'] = sprintf($phpfox_lang['lost_password_verify'],$email_check['email']);
}
else
{
$phpfox_replace['email_invalid'] = TRUE;
}
}
phpfox_load_template("lost_password",$phpfox_build);
break;
ans know i remember why im using this lines in $To
$PHPFOX_POST[email] <PHPFOX_POST>
cuz when the user who are lost his/she's password they fill in their email and the $To will send it to the email who are posting/printing.
EDIT2:
I added this into: (but dont know if that is right)
$to = "$PHPFOX_POST[email] '<PHPFOX_POST> $from, 'To' => $to, 'Subject' => $subject)";
and the popup will load the Enter Email then the text box, but it will not send the email and it will not load the "Thanks for sending the email".
shall i use this code to get that confirm msg? but where to put it?
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
and i also think that i need to include this in something:
code=php;[/code]
in the start i think i need also this (tell which port ect ect):
$Port = 25;
$SMTPAuth = true;
$Timeout = 10;