Hi there im having a issue sending to yahoo aol ect. but can send to icloud. below is the code any idea what im doing worng. Like i said it send fine to icloud.

$message =
"Hello \n
Thank you for registering with us. Here are your login details...\n

User ID: $user_name
Email: $usr_email \n
Passwd: $data[pwd] \n

$a_link

Thank You

Administrator
$host_upper
______________________________________________________
THIS IS AN AUTOMATED RESPONSE.
***DO NOT RESPOND TO THIS EMAIL****
";

    mail($usr_email, "Login Details", $message,
    "From: \"Member Registration\" <admin@mysite.com>\r\n" .
     "X-Mailer: PHP/" . phpversion());

 header("Location: thankyou.php");
  exit();

     }
 }

Is there any way of finding if the email has been sent?

Hold on.. I have an idea. Change the bottom part of your code to this..

 echo(mail($usr_email, "Login Details", $message,
"From: \"Member Registration\" <admin@mysite.com>\r\n" .
"X-Mailer: PHP/" . phpversion()) ? 'Email Sent' : 'Email not Sent');

## we don't want to redirect for now. All we want to check is the status.
 //header("Location: thankyou.php");
    //exit();

Let me know what is the response you are getting...

it just goes back to my register page. still dont recieve at yahoo address but tried another email address and recieved no issue. seems to be with yahoo. i dont get it in spam folder for yahoo. it just doesnt arrive

You may find that Yahoo! have blocked the server the mail is being sent from, bouncing it back or just refusing it. The mail log on the server sending the mail will be able to tell you this.

I've seen it a lot where the server sending the mail has mis-matched hostname and reverse DNS or a hostname which doesn't resolve properly. A lot of mail providers, Yahoo! included, will not accept mail from a server which hasn't been set up properly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.