<?php

session_destroy();
 


       // $to = $email;
  		//$from = 'info@mywin.in.net';
		//$subject = 'Send Otp';
	
		$email = $_POST['email'];
		
					$from ="info@mywin.in.net";
					$to=$_POST['email'];
					$subject="verify-account-otp";

					$otp = rand(1000,10000);
					$message=strval($otp);
					$headers="From:" .$from;
					if(mail($to,$subject,$message,$headers)){
					    session_start();
						$_SESSION["otpcode"]= $otp;
						echo 'success';
					}else{
					   echo 'failed'; 
					}
		

?>