Aşağıdaki kod mail passsword göndermek ama ben bunu nasıl yapabilirim ona SMTP kimlik doğrulaması eklemek istediğiniz yahoo ve gmail gitmez benim posta kodudur.
<?php
if(isset($_POST['submit'])){
If(empty($_POST['email'])) {
echo 'Please fill in the required fields!';
}else{
$email_to = $_POST['email'];
$sql = "SELECT statue FROM statue WHERE mail='$email_to'";
$result = mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
$rows = mysql_fetch_array($result);
$your_password = $rows['statue'];
$to = $email_to;
$subject = "Your password here";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .="from: Alinke <support@mydomain.com>";
$messages ="Here is your password : $your_password";
$sentmail = mail($to,$subject,$messages,$headers);
}else{
echo 'your email can not be found in our database';
}
if($sentmail){
echo 'Your password has been sent to your email address.';
}else{
echo 'Cannot send password to your e-mail address';
}
}
}
>