Page 1 of 1

Has anyone ever seen this Yahoo Mail problem?

Posted: Wed Jul 15, 2009 2:43 pm
by ninethousandfeet
this is so bizarre, my php mail() works with some Yahoo Mail accounts and not with others... it is about 50/50. it works just fine with all other mail clients that i've run it through to this point (hotmail, msn, gmail).

has anyone seen this problem before? any idea on how to make it so my mail goes through all of the time? i'm not sending junk mail, users only receive mail when they sign up, receive a new comment, or get a new item in their shopping cart.

mail script for my registration page:

Code: Select all

 
$to = $_POST['email']; // user email
$subject = "Welcome to mysite.com!";
$headers  = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
$headers .= "From: mysite <me@ mysite.com>" . "\r\n";
$headers .= "Reply-To: mysite <me@ mysite.com>" . "\r\n";
$message = "
<table width='480' bgcolor='#732C7B' border='4' bordercolor='#732C7B' cellpadding='6'><tr bgcolor='#732C7B'><td><font size=+4 color='#FFFFFF'><b> mysite </b></font></td></tr><tr bgcolor='#F7F6FF'><td><br /><font color='#000000'><b>Welcome, $username!</b>
<br /><br />
Visit the link to complete your activation,<br />
<a href='http://www. mysite.com/USERactivateandpost.php?activationkey=$activationkey&user_id=$user_id>http://www. mysite.com/USERactivateandpost.php?activationkey=$activationkey&user_id=$user_id</a><br />
(if this does not appear as a link, copy and paste it into your preferred browser)
<br />
About mysite.com:<br />
Blah blah 
<br />
-- Feel free to send us questions or concerns, email contact@ mysite.com, we'd love to help! --<br /></font></td></tr></table>";
  mail($to, $subject, $message, $headers);
 
thank you!

Re: Has anyone ever seen this Yahoo Mail problem?

Posted: Wed Jul 15, 2009 3:14 pm
by feliciakay
yup i had the same problem once

Re: Has anyone ever seen this Yahoo Mail problem?

Posted: Wed Jul 15, 2009 3:23 pm
by requinix
feliciakay wrote:yup i had the same problem once
Which implies that you fixed it, which implies that you're a bad person for not sharing your solution. Congratulations.


Does this happen consistently with those accounts? Are the emails landing in the junk box or not showing up at all? Have you noticed that there's a space in the From and Reply-To addresses and realized that they shouldn't be there?

Re: Has anyone ever seen this Yahoo Mail problem?

Posted: Wed Jul 15, 2009 3:28 pm
by ninethousandfeet
tasairis,

love the response.

the weird thing is that the mail doesn't even go to the spam/junk folder, it just never shows up. i've checked with my host and the relay shows a 250ok success message every time (even though it isn't going through half of the time)... it always works with certain Yahoo Mail accounts i've set up for testing, but it never works on some friend's Yahoo Mail accounts (which i now use as additional testers).

i didn't know about the spacing, i'll try that real quick. any other ideas on what i can do to ensure this stops happening?

Re: Has anyone ever seen this Yahoo Mail problem?

Posted: Wed Jul 15, 2009 3:40 pm
by Skara
Sometimes it's hit or miss. You can try adding more headers like X-Mailer: php mail()... whatever.
You could also try phpmailer rather than simply using mail().