Has anyone ever seen this Yahoo Mail problem?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ninethousandfeet
Forum Contributor
Posts: 130
Joined: Tue Mar 10, 2009 4:56 pm

Has anyone ever seen this Yahoo Mail problem?

Post 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!
feliciakay
Forum Newbie
Posts: 1
Joined: Wed Jul 15, 2009 3:07 pm

Re: Has anyone ever seen this Yahoo Mail problem?

Post by feliciakay »

yup i had the same problem once
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Has anyone ever seen this Yahoo Mail problem?

Post 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?
ninethousandfeet
Forum Contributor
Posts: 130
Joined: Tue Mar 10, 2009 4:56 pm

Re: Has anyone ever seen this Yahoo Mail problem?

Post 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?
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Re: Has anyone ever seen this Yahoo Mail problem?

Post 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().
Post Reply