Ver Mensaje Individual
  #8 (permalink)  
Antiguo 10/03/2014, 11:03
pereza_2008
 
Fecha de Ingreso: noviembre-2010
Ubicación: Concordia
Mensajes: 95
Antigüedad: 13 años, 5 meses
Puntos: 6
Respuesta: Problemas con Formulario y Validación SPRY

porque usas sendamail y no la funcion mail de php?

<?php
if ($_POST["formid"]==1)
{


$contenido='Nombre: '.utf8_decode(nl2br($_POST['name'])).'<br>
Email: '.utf8_decode($_POST['email']).'<br>
Teléfono: '.utf8_decode($_POST['telefono']).'<br>
Consulta: '.nl2br($_POST['message']).'<br>';
$asunto='Mensaje desde xxxxxxxxxxxxx';

EnvioCorreoHtml($destino, $asunto, $contenido, $cabeceras );




echo "1";
}?>

y aca la funcion;

function EnvioCorreoHtml($destinatario, $cabeceras, $contenido, $asunto) {
$mensaje = '<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Contacto</title></head>
<body><table width="90%">
<tr><td><img src="http://www.xxxxxxxxx.com.ar/images/logo.png" /></td></tr>
<tr><td>';

$mensaje .= $contenido;
$mensaje .= '<br><br><br><p>Correo enviado desde xxxxxxxxxx</p></td></tr></table></body></html>';
// CABECERA CONTENT-TYPE (TIPO DE ELEMENTO QUE CONTIENE MAIL)
$cabeceras = 'MIME-Version: 1.0' . "\n";

$cabeceras .= 'Content-type: text/html; charset=utf-8' . "\r\n";
//CABECERAS ADICIONALES
$cabeceras .= "From: xxxx- [email protected]\r\n" ;

$cabeceras .= "BCC: pablo <[email protected]>\r\n";

//ENVIARLO
mail($destinatario, $asunto, $mensaje, $cabeceras) . "\n";


}