lista de correo

This commit is contained in:
humano 2018-11-07 10:29:08 -05:00
parent 0bd778abc0
commit 1ebe72531d

View File

@ -3288,7 +3288,11 @@ function mailer($accion,$formulario,$campo,$empresa){
if($accion =="enviar" OR $accion =="preview" ) { if($accion =="enviar" OR $accion =="preview" ) {
$id_campo = $formulario['campo']; $id_campo = $formulario['campo'];
$campo_nombre = $formulario['nombre']; $campo_nombre = $formulario['nombre'];
$nombre_respuesta= $formulario['nombre_respuesta'];
$email_respuesta= $formulario['email_respuesta'];
$campo_nombre = $formulario['nombre'];
$email = remplacetas("empresa","id","$id_empresa","email","");
$razon_social = remplacetas("empresa","id",$id_empresa,"razon_social","");
$id_empresa = $formulario['empresa']; $id_empresa = $formulario['empresa'];
$id_formulario = $formulario['formulario']; $id_formulario = $formulario['formulario'];
$asunto = $formulario['asunto']; $asunto = $formulario['asunto'];
@ -3313,17 +3317,23 @@ if($accion =="enviar" OR $accion =="preview" ) {
if (mysqli_num_rows($sql)!='0'){ if (mysqli_num_rows($sql)!='0'){
// mysqli_data_seek($sql, 0); // mysqli_data_seek($sql, 0);
$id_empresa= "$_SESSION[id_empresa]"; $id_empresa= "$_SESSION[id_empresa]";
$email = remplacetas("empresa","id","$id_empresa","email","");
if($email_respuesta ==""){
$email_respuesta = $email[0];
$nombre_respuesta= $razon_social[0];
}
$administrador = remplacetas("empresa","id","1","email",""); $administrador = remplacetas("empresa","id","1","email","");
$reply = remplacetas("empresa","id","$id_empresa","email",""); $reply = remplacetas("empresa","id","$id_empresa","email","");
$imagen = remplacetas("empresa","id",$id_empresa,"imagen",""); $imagen = remplacetas("empresa","id",$id_empresa,"imagen","");
$razon_social = remplacetas("empresa","id",$id_empresa,"razon_social","");
$web = remplacetas("empresa","id",$id_empresa,"web",""); $web = remplacetas("empresa","id",$id_empresa,"web","");
$slogan = remplacetas("empresa","id",$id_empresa,"slogan",""); $slogan = remplacetas("empresa","id",$id_empresa,"slogan","");
$headers = "MIME-Version: 1.0\r\n"; $headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n";
$headers .= "From: $razon_social[0] <".$administrador[0].">\r\n"; $headers .= "From: $nombre_respuesta <".$email_respuesta.">\r\n";
$headers .= "Reply-To: $razon_social[0] <".$email[0].">\r\n"; $headers .= "Reply-To: $nombre_respuesta <".$email_respuesta.">\r\n";
$headers .= "Return-path: <$email[0]>\r\n"; $headers .= "Return-path: <$email[0]>\r\n";