Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/12/2008, 06:38
reflex_bcn
 
Fecha de Ingreso: febrero-2008
Mensajes: 15
Antigüedad: 16 años, 2 meses
Puntos: 0
Respuesta: Desesperado, formulario OK en mi web pero no en otra.

Gracias por contestar, perdón por no incluirlo. Como sería muy largo lo he simplificado respetando cabeceras, la forma en que paso los campos, etc.

<?
/*email para admin en html*/
$e = 'XXXXXXXXXX';
$nick = $HTTP_POST_VARS['nombre'];
$asunto = "Sugerencia desde XXXXX";
$mensaje = $HTTP_POST_VARS['mensaje'];
$email = $HTTP_POST_VARS['email'];

$sms = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>XXXXXXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Keywords here">
<meta name="description" content="Description here">

<style type="text/css">
<!--
a:link {
color: #00CCFF;
}
a:visited {
color: #0099CC;
}
-->
</style></HEAD>
<BODY BGCOLOR=#efefef style="margin:0">
<p style="color: #eeeeee; font-size: 14px;">'.$nick.'</p>
<p style="color:#eeeeee; font-size: 14px;">'.$email.'</p>
<p><span class="style1" style="color:#ffffff;">Cuerpo del mensaje:</span></p>
<p><span class="style1" style="color:#ffffff;">'.$mensaje.'.</span></p>
</BODY>
</HTML>
';

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: IUSweb <XXXXXxx>\r\n";
$headers .= "Reply-To: XXXXXXXXXX";
/*Enviamos email notificación al administrador*/
if(mail($e, $asunto, $sms,$headers)){
echo utf8_encode('&respuesta=::::Su E-mail ha sido enviado::::&');
}else{
echo utf8_encode('&respuesta=::::Ha surgido un problema::::&');
}


$email2= $HTTP_POST_VARS['email'];
$nombre2= $_POST['nombre'];
$mensaje2= $_POST['mensaje'];
/*confirmacion2 es el mensaje de confirmación para el visitante en HTML*/
$confirmacion2 = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>XXXXXXXX</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Keywords here">
<meta name="description" content="Description here">

<style type="text/css">
<!--
a:link {
color: #00CCFF;
}
a:visited {
color: #0099CC;
}
-->
</style></HEAD>
<BODY BGCOLOR=#efefef style="margin:0">
<p style="color: #eeeeee; font-size: 14px;">Gracias, '.$nick.', hemos recibido su mensaje.</p>
<p><span class="style1" style="color:#ffffff;">Copia del mensaje:</span></p>
<p><span class="style1" style="color:#ffffff;">'.$mensaje.'.</span></p>
</BODY>
</HTML>
';

$cabeceras2 = 'MIME-Version: 1.0' . "\r\n";
/*$cabeceras2 .= 'Content-type: text/html; charset=UTF-8' . "\r\n";*/
$cabeceras2 .= "Content-type: text/html; charset=iso-8859-1\r\n";
$cabeceras2 .= 'From: XXXXXXX < XXXXXXXXXX >' . "\r\n";
/*Enviamos email confirmación al visitante*/
mail($email2, "Su correo a XXXXXXX ha sido recibido",$confirmacion2,$cabeceras2);
?>


Así pues, ¿es posible que el problema sea el código a pesar de funcionar perfecto en mi web?