Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/04/2013, 21:02
asandicr89
 
Fecha de Ingreso: febrero-2012
Mensajes: 12
Antigüedad: 12 años, 2 meses
Puntos: 0
Exclamación Error de envío de correo

Buenas noches compañeros,

Hasta hace poco tenía un código para envío de un form html que funcionaba correctamente. El problema que he tenído ha sido al agregar el "CC". He tratado de acomodarlo de diferentes formas pero no le llego a la solución. Les dejo el código para que le echen un ojo y me brinden alguna sugerencia.

Gracias!

Código PHP:
<?php
$name 
$_POST["name"]; 
$lstname $_POST["lstname"]; 
$bday $_POST["bday"];
$nacionality $_POST["nacionality"];
$id $_POST["id"];
$sex $_POST["sex"];
$address $_POST["address"];
$zip $_POST["zip"]; 
$country $_POST["country"];
$company $_POST["company"];
$title $_POST["title"];
$profession $_POST["profession"];
$email $_POST["email"];
$phone $_POST["phone"];
$mphone $_POST["mphone"];
$fax $_POST["fax"];
$bio $_POST["bio"];
$relevance $_POST["relevance"];
$toget $_POST["toget"];
$disability $_POST["disability"];
$toknow $_POST["toknow"];
$emergency $_POST["emergency"];
$hear $_POST["hear"];

//se incluyen las variables del form en el mensaje 
$mensaje .="NAME: " .$name ."\n";
$mensaje .="LAST NAME: " .$lstname ."\n";
$mensaje .="DATE OF BIRTH: " .$bday."\n"
$mensaje .="NACIONALITY: " .$nacionality."\n"
$mensaje .="PASSPORT OR ID NUMBER: " .$id."\n";
$mensaje .="SEX M/F: " .$sex."\n";
$mensaje .="ADDRESS: " .$address."\n";
$mensaje .="ZIP CODE: " .$zip."\n";  
$mensaje .="COUNTRY OF RESIDENCE: ".$country."\n";
$mensaje .="ORGANIZATION/COMPANY: ".$company."\n";
$mensaje .="TITLE: ".$title."\n";
$mensaje .="PROFESSION: ".$profession."\n";
$mensaje .="EMAIL ADDRESS: ".$email."\n"
$mensaje .="PHONE: ".$phone."\n";
$mensaje .="MOBILE PHONE: ".$mphone."\n";
$mensaje .="FAX: ".$fax."\n";
$mensaje .="SHORT BIO: ".$bio."\n";
$mensaje .="RELEVANCE OF COURSE: ".$relevance."\n";
$mensaje .="HOPE TO GET: ".$toget."\n";
$mensaje .="DISABILITYS OR MEDICAL CONDITION: ".$disability."\n";
$mensaje .="ADDITIONAL INFORMATION: ".$toknow."\n";
$mensaje .="EMERGENCY CONTACT: ".$emergency."\n";
$mensaje .="HOW DIT YOU HEAR ABOUT US: ".$hear."\n";

$cabeceras "From:<$email>" "\r\n" .
"CC: [email protected]"
         
$asunto "A contact form has been received";

$body_top "--Message-Boundary\n"
$body_top .= "Content-type: text/plain;charset=US-ASCII\n"
$body_top .= "Content-transfer-encoding: 7BIT\n"
$body_top .= "Content-description: Mail messagebody\n\n"
$cuerpo $mensaje

//cuenta de correo a donde llegara el formulario 
$destino '[email protected]'

if (mail($destino,$asunto,$cuerpo,$cabeceras)) 
{
?>
<script type='text/javascript'>
alert ('Your information has been sent!');
window.location = "http://eci.cybertico.uphero.com/"
</script>
<?php
} else { 
echo (
"ERROR"); 
}  
?>