![Patada](http://static.forosdelweb.com/fdwtheme/images/smilies/footinmouth.png)
He probado a qitar las plantillas, pero sigue igual
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
$Html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'.$Html;
$OB="----=_OuterBoundary_000";
$IB="----=_InnerBoundery_001";
$Html=$Html?$Html:preg_replace("/\n/","{br}",$Text)
or die("neither text nor html part present.");
$Text=$Text?$Text:"Su programa de correo no soporta mensajes HTML.";
$From or die("Es necesario el Email del remitente");
$To or die("Es necesario el Email del destinatario");
$headers ="MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-15\r\n";
$headers.="From: ".$FromName." <".$From.">\r\n";
$headers.="To: ".$ToName." <".$To.">\r\n";
$headers.="Reply-To: ".$FromName." <".$From.">\r\n";
$headers.="X-Priority: 1\r\n"; // 1 alta a 3 normal
$headers.="X-MSMail-Priority: High\r\n";
$headers.="X-Mailer: ITG\r\n";
$headers.="Content-Type: multipart/mixed;\n\tboundary=\"".$OB."\"\r\n";
//Messages start with text/html alternatives in OB
$Msg ="This is a multi-part message in MIME format.\r\n";
$Msg.="\n--".$OB."\n";
$Msg.="Content-Type: multipart/alternative;\n\tboundary=\"".$IB."\"\n\n";
//plaintext section
$Msg.="\n--".$IB."\n";
$Msg.="Content-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n";
$Msg.="Content-Transfer-Encoding: quoted-printable\n\n";
// plaintext goes here
$Msg.=$Text."\n\n";
// html section
$Msg.="\n--".$IB."\n";
$Msg.="Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n";
$Msg.="Content-Transfer-Encoding: base64\n\n";
// html goes here
$Msg.=chunk_split(base64_encode($Html))."\n\n";
// end of IB
$Msg.="\n--".$IB."--\n";