Sobre tu duda la verdad que no se que puede ser... Todo parece estar OK.
Yo uso la clase PHPMailer en vez de la tipica mail()
Simplemente tienes que descargartela de internet e incluirla en tu proyecto.
Después, puedes usar esta funcion PHP que me he creado yo, adaptandola a tu proposito:
Código PHP:
Ver original<?php
function enviar_mail($Subject, $address, $cuerpo) {
/*
$Subject = asunto del mail
$address = correo del destinatario
$cuerpo = texto del correo
*/
require_once('PHPMailer/class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.1and1.es"; // SMTP server
// $mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "smtp.1and1.es"; // sets the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Password = "xxxxxxxxx"; // SMTP account password
$mail->Subject = $Subject;
$mail->MsgHTML("<html>
<body>
<STYLE type='text/css'>
body{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #415178;
font-weight: normal;
}
a:link, a:visited {
color: #b38ebe;
text-decoration: none;
}
a:hover {
color: #8f5f9d;
font-weight: normal;
text-decoration: underline;
}
</STYLE>
<table bgcolorborder='0' cellspacing='0' cellpadding='0' width='600' align='center'>
<tr>
<td>
<p><a href='http://xxx' title='Intranet'><img src='imagenes/logos.png' title='Intranet' alt='Intranet'/></a></p>
</td>
</tr>
<tr>
<td>
<table border='0' cellspacing='0' cellpadding='0' width='580' align='center'>
<p><br></p>
<p style='font-family:Arial, Helvetica, sans-serif; font-size:26px; color:#ff9900;'>>> Intranet</p>
<p>$cuerpo</p>
<p><b><i>Recuerde tratar el contenido de este correo con privacidad.</i></b></p>
</table>
</td>
</tr>
</table>
</body>
</html>
");
$mail->AddAddress($address, $address);
$mail->Send();
}
?>
Aunque lo anterior no de respuesta a tu problema... como alternativa, espero que te sirva.
Saludos.
**EDITO:
La clase puedes descargarla de aqui:
https://github.com/PHPMailer/PHPMailer
La funcion la puedes probar asi: enviar_mail("prueba", "
[email protected]", "asdfasddas");