Page 1 of 1

mail() only working for .com recipients?

Posted: Mon Jan 26, 2009 6:32 am
by wojtek.galaj
Hello everyone,

I have been breaking my head over this for a couple of hours now and I am absolutely stuck. I really need help :)

I have a simple sendMail.php file on my server. Here's the code:

Code: Select all

 
<?php
$sendTo = "xxx@xxx.com";
$subject = $_POST["referencia"];
$headers = "From: " . $_POST["nombre"] . "<" . $_POST["email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-path: " . $_POST["email"];
$message = "Formulario " . $_POST["referencia"] . "\r\n" . "\r\n" .
            "Nombre: " . $_POST["nombre"] . "\r\n" .
            "eMail: " .$_POST["email"] . "\r\n" .
            "Telefono: " . $_POST["telefono"] . "\r\n" .
            "Coche: " .$_POST["coche"] . "\r\n" .
            "Comentarios: " .$_POST["comentarios"] . "\r\n";
mail($sendTo, $subject, $message, $headers);
?>
 
As You can see it's really simple. Thing is, it will work only for some recipients. If I put my gmail account in $sendTo everything is fine. I have also tried with hotmail. However, neither my yahoo.co.uk account not my private .es mail recieves anything. I'm led to believe only .com domains recieve that mail? Does that make sense?

:banghead:

I dire need of some assistance...
Wojtek