Forum Moderators: coopster
<?php
$sendTo = $_POST["toemail"];
$subject = $_POST["subject"];
$message = $_POST["message"];
$from = $_POST["name"];
$fromemail = $_POST["email"];
$html = '<html><body>' . $message . '</body></html>';
mail($sendTo,
$subject,
$html,
'To: Friend <' . $seldTo . ">\n" .
'From: ' . $from . '<' . $fromemail .">\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1");
?>
Check your spam folder.
<?php
$to = "myaddress@yahoo.com";
$subject = "test";
$body = testing testing 123";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
This also fails, though it report success. I set up another email address at another site and it receives mail ok, but not yahoo. I was curious if maybe Yahoo requires some other parameters or if maybe my host has some problem I need to address.
Doesn't appear to be a problem with the spam filter. The message does not appear in the Spam/Bulk mail folder.
I've had the same problem sending to Hotmail. In the end I found out that if your web host doesn't have valid PTR records Hotmail can fail to deliver the email to your mailbox without even putting it in the junk email folder. Perhaps Yahoo behaves in the same way?