shwetapandit Posted October 25, 2013 Share Posted October 25, 2013 this is my file in PHPMailer/test folder location.Plz help <?php$email = $_POST["email"];$pattern = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z])/';$email_test = preg_match("$pattern", $email);if($email_test){ include("settings.php"); //FILE WITH THE IMPORTANT MySQL INFORMATIONrequire_once "C:\wamp\www\PHPMailer_5.2.4/class.phpmailer.php";$mailer = new PHPMailer();$mailer->IsSMTP();$mailer->Host = "smtp.gmail.com:587";$mailer->SMTPsecure='tls';$mailer->SMTPAuth = TRUE;$mailer->Username = "[email protected]"; // Change this to your gmail adress$mailer->Password = "pass"; // Change this to your gmail password$mailer->From = "[email protected]"; // This HAVE TO be your gmail adress$mailer->FromName = "you temporary password"; // This is the from name in the email, you can put anything you like here$mailer->Body = "This is the your temporary password";$mailer->Subject = "Temporary password";$q = mysql_query("SELECT * FROM simple_login WHERE email='".$email."'"); $n = mysql_num_rows($q); $r = mysql_fetch_assoc($q);$mailer->headers = "From: Your Site \r\n";$mailer->headers.= "Content-type: text/html\r\n";$mailer->message = "You have requested that you forgot your password.<br> Password: <b>".$r["password"]."<b>";$mailer->AddAddress("$email"); // This is where you put the email adress of the person you want to mailif(!$mailer->Send()){echo invalid Email<br/ >';echo "Mailer Error: " . $mailer->ErrorInfo;}else{echo 'Password sent to <b>'.$email.'</b>';;}?> Link to comment https://forums.phpfreaks.com/topic/283272-script-is-not-working-n-does-not-show-any-errorwarningnotice/ Share on other sites More sharing options...
iarp Posted October 25, 2013 Share Posted October 25, 2013 You need to turn on display_errors to see what's going on. It'll be found in the php.ini file of your servers configuration. Link to comment https://forums.phpfreaks.com/topic/283272-script-is-not-working-n-does-not-show-any-errorwarningnotice/#findComment-1455396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.