I tried many site but I can't find the result what I want to do.so anybody can please help me to solve this ?
My problem is : I want to send forgot password email to client.which is expire after 15 min.Here is my code
function send_email($to, $subject, $message) { global $from_email; global $from_pwd; global $host; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->ContentType = "text/html"; $mail->Host = $host; $mail->Port = 465; $mail->SMTPAuth = true; $mail->SMTPSecure = 'ssl'; $mail->Username = $from_email; $mail->Password = $from_pwd; $mail->From = $from_email; $mail->AddAddress($to); $mail->Subject = $subject; $mail->Body = $message; if(!$mail->Send()) { die('Message was not sent.'.$mail->ErrorInfo); } }
And I also Added This code
//Send Welcome Email require_once("classes/class.phpmailer.php"); send_email($_POST["email"],"Thanks For Register", "Php Link is here");