require "Templates/db_conn.inc.php"; include("Templates/header.inc.php"); function send_email_by_phpmailer($send_email_to, $send_email_username, $subject, $message) { //global $phpmailer_path; //require $phpmailer_path."class.phpmailer.php"; require "class.phpmailer.php"; // set phpmailer variables (using gmail here) $gmail_username = "phoenixsportsusa@gmail.com"; $gmail_password = "987654321#phonix"; //$webmaster_email123 = "admin@atsdatabase.com"; $webmaster_email123 = "thepst@rogers.com"; $from_name = "ATSdatabase Administrator"; $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = $gmail_username; // SMTP username $mail->Password = $gmail_password; // SMTP password $webmaster_email = $webmaster_email123; //Reply to this email ID $email = $send_email_to; // Recipients email ID $name = $send_email_username; // Recipient's name $mail->From = $webmaster_email; $mail->FromName = $from_name; $mail->AddAddress($send_email_to, $name); //$mail->AddReplyTo($webmaster_email,"Webmaster"); $mail->WordWrap = 50; // set word wrap //$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // attachment $mail->IsHTML(true); // send as HTML $mail->Subject = $subject; $mail->Body = $message; //HTML Body $mail->AltBody = "This is the body when user views in plain text format"; //Text Body $mail->Send(); /*if($mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; }*/ } #----db connection //require "Templates/config.inc.php"; ?>
";
echo "You forgot to enter your User Name... "; echo " |
";
echo "You forgot to enter your Email Address... "; echo " |
";
echo "No records found matching your email address and User name "; echo " |
We have reset your password.
Following are Login Details
Username: $username1
Password: $random_password
Thanks
ATSSTATS.com";
$headers .= "From: ".$sitename." <".$sitemail.">\n";
$headers .= "X-Sender: <".$sitemail.">\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
#---- send email to admin
//mail($admin_email, $subject, $message, $headers);
//mail($email_address, $subject, $message, $headers);#user
//mail('pranju2511@yahoo.co.in', $subject, $message, $headers);#atsdb admin
//mail('prismdeepali@yahoo.com', $subject, $message, $headers);#atsdb admin
send_email_by_phpmailer($email_address, $username1, "Password To Access atsdatabase.com", $message);
echo "
";
echo "Your New Password has been sent to your email address ! Please check your email! "; echo " |