![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
13/09/2013, 13:45
|
| | Fecha de Ingreso: enero-2013 Ubicación: Buenos Aires San Miguel
Mensajes: 2
Antigüedad: 12 años Puntos: 0 | |
Respuesta: E-mail HTML con PHP Gente disculpen, este es el codigo. Muchas gracias! Código PHP: <?php
/* EMAIL AL CLIENTE */
$target = "[email protected]";
$targetname = "XXXXX XXXX XXXX";
$subjprefixe = true;
$subjprefix = "sus datos llegaron correctamente!";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: ' . $tnombre . ' <' . $temail . '>' . "\r\n";
$headers .= 'From: ' . $targetname . ' <' . $target . '>' . "\r\n";
$headers .= 'Reply-To: ' . $targetname . ' <' . $target . '>' . "\r\n";
if($subjprefixe == true) {
$subjprefix = $tnombre. " " .$subjprefix ;
}
$message = "<html><head>
</head>
<body>
<div align='center'>
<table class='ecxMsoNormalTable' border='0' cellpadding='0' width='100%' style='width:100.0%;background:#fff;'>
<tbody>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt;'><div align='center'>
<img src='http://www.xxxxxxxx.xxx/2013/img/mail/mail-header.jpg' alt='XXXXXX VC SRL'><table class='ecxMsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='600' style='width:450.0pt;'><tbody>
<tr>
</tr><tr style='height:7.5pt;'><td valign='top' style='padding:0cm 0cm 0cm 0cm;height:7.5pt;'><p class='ecxMsoNormal'><span style='font-size:4.0pt;'> </span></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm;'><table class='ecxMsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='600' style='width:450.0pt;'><tbody><tr style='height:7.5pt;'><td colspan='2' valign='top' style='background:#fcc506;padding:0cm 0cm 0cm 0cm;height:7.5pt;'><p class='ecxMsoNormal'><span style='font-size:4.0pt;'> </span></p></td><td width='10' valign='top' style='width:7.5pt;background:#fcc506;padding:0cm 0cm 0cm 0cm;height:7.5pt;'><p class='ecxMsoNormal' align='right' style='text-align:right;'><span style='font-size:4.0pt;'> </span></p></td></tr><tr style='height:15.0pt;'><td width='10' valign='top' style='width:7.5pt;background:#fcc506;padding:0cm 0cm 0cm 0cm;height:15.0pt;'><p class='ecxMsoNormal'> </p></td><td style='background:#fcc506;padding:0cm 0cm 0cm 0cm;height:15.0pt;'><p class='ecxMsoNormal'><span style='font-size:15.0pt;font-family:"Arial","sans-serif";color:white;'> Pedido de Registro</span></p></td><td width='10' valign='top' style='width:7.5pt;background:#fcc506;padding:0cm 0cm 0cm 0cm;height:15.0pt;'><p class='ecxMsoNormal' align='right' style='text-align:right;'> </p></td></tr><tr style='height:7.5pt;'><td colspan='3' valign='top' style='background:#fcc506;padding:0cm 0cm 0cm 0cm;height:7.5pt;'><p class='ecxMsoNormal'><span style='font-size:4.0pt;'> </span></p></td></tr><tr height='0'><td width='10' style='border:none;'></td><td width='580' style='border:none;'></td><td width='10' style='border:none;'></td></tr></tbody></table></td></tr><tr style='height:15.0pt;'><td style='background:white;padding:0cm 0cm 0cm 0cm;height:15.0pt;'><p class='ecxMsoNormal'> </p></td></tr><tr><td valign='top' style='background:white;padding:0cm 0cm 0cm 0cm;'><div align='center'><table class='ecxMsoNormalTable' border='0' cellspacing='0' cellpadding='0' width='600' style='width:450.0pt;'><tbody><tr><td width='30' style='width:22.5pt;padding:0cm 0cm 0cm 0cm;'><p class='ecxMsoNormal'> </p></td><td valign='top' style='padding:0cm 0cm 0cm 0cm;'><h2><span style='font-size:13.5pt;font-family:"Arial","sans-serif";color:#000;'>Sus datos han sido enviados correctamente.</span></h2><p><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#555555;'>Los mismos están siendo procesados.</span></p><p class='ecxMsoNormal'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#555555;display:none;'> </span></p><table class='ecxMsoNormalTable' border='0' cellspacing='0' cellpadding='0'><tbody><tr><td style='background:#fff6aa;padding:11.25pt 11.25pt 11.25pt 11.25pt;'><p class='ecxMsoNormal' style=''><strong><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#666666;'>Atención:</span></strong><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#666666;'><br>Igualmente tiene a su disposición en nuestra página web la información de cada uno de nuestros productos!</span></p></td></tr></tbody></table><p><em><b><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#555555;'>Quedamos a tu disposición.</span></b></em><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:#555555;'><br>Departamento Administrativo<br><a href='http://xxxxxxxx.xxx' target='_blank' title='xxxxxxxx.xxx La calidad en motorepuestos'>xxxxxxxx.xxx</a> - La calidad en motorepuestos</span></p></td><td width='30' style='width:22.5pt;padding:0cm 0cm 0cm 0cm;'><p class='ecxMsoNormal'> </p></td></tr></tbody></table></div></td></tr><tr><td valign='top' style='background:white;padding:0cm 0cm 0cm 0cm;'></td></tr><tr style='height:15.0pt;'><td style='padding:0cm 0cm 0cm 0cm;height:15.0pt;'><p class='ecxMsoNormal'> </p><img src='http://www.xxxxxxxx.xxx/2013/img/mail/mail-footer.jpg' alt='XXXXXX VC SRL'></td></tr><tr><td valign='top' style='padding:0cm 0cm 0cm 0cm;'><p class='ecxMsoNormal' align='center' style='text-align:center;'><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#999999;'>Todos los derechos reservados xxxxxxxx.xxx - 2013</span></p></td></tr><tr style='height:30.0pt;'><td style='padding:0cm 0cm 0cm 0cm;height:30.0pt;'><p class='ecxMsoNormal'> </p></td></tr></tbody></table></div></td></tr></tbody>
</table>
</div></body></html>";
/* Consultas */
include("admin/class/cnn.php");
$consultaEmail = "SELECT titu_email FROM clientes WHERE titu_email = '$temail'";
$resultadoEmail = mysql_query($consultaEmail, $link);
$filaEmail = mysql_fetch_array($resultadoEmail, MYSQL_ASSOC);
ini_set(sendmail_from, '[email protected]');
if($filaEmail['titu_email'] == $temail){
echo '<span id="suscripto">Ya se encuentra suscripto</span>';
}else if(mail($temail, $subjprefix, $message, $headers)){
$consultaEntrada = "INSERT INTO clientes
(emp_avatar, emp_rsocial, emp_nomfantasia, emp_direccion, emp_localidad, emp_ciudad, emp_pais, emp_cp, emp_cuit, emp_ingbrutos, emp_entrega, titu_nombre, titu_email, titu_telefono, titu_movil, titu_pass, titu_pass_encript, titu_estado)
VALUES ('avatar.jpg','$rsocial', '$namef', '$dir', '$loc', '$ciudad', '$pais', '$cp', '$cuit', '$ingresos', '$entrega', '$tnombre', '$temail', '$ttel', '$tmovil','$tpass','".md5($tpass)."','Analizando')
";
$resultadoEmail = mysql_query($consultaEntrada, $link);
echo '<span id="enviado">Muchas gracias!!! <br>Mensaje enviado correctamente.</span>';
}else {
echo '<span id="error">Ocurrio un error mientras se enviaba el email.</span>';
}
?> |