Problema con el receptor de formulario de contacto
Publicado por Ivan Raubert (2 intervenciones) el 19/11/2014 14:44:43
Hola Gente!
Estoy teniendo un problema con un formulario de contacto, al llenarlo el contenido llega al mail completado por el usuario y no al que deseo que llegue que está en la variable para. Copio el codigo, desde ya muchas gracias
Estoy teniendo un problema con un formulario de contacto, al llenarlo el contenido llega al mail completado por el usuario y no al que deseo que llegue que está en la variable para. Copio el codigo, desde ya muchas gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
if(isset($_POST["nombre"]) && isset($_POST["mail"]) && isset($_POST["comentarios"])){
$para = "ivan_raubert@hotmail.com";
$remitente = $_POST["mail"];
$nombre = utf8_decode($_POST["nombre"]);
$comentarios = utf8_decode($_POST["comentarios"]);
$fecha = date("D-M-y H:i");
$subject = "XXX";
$texto = "Fecha: ".$fecha."\r\n";
$texto .= "Nombre: ".$_POST["nombre"]."\r\n";
$texto .= "De: ".$remitente."\r\n";
$texto .= "Asunto: ".$_POST["asunto"]."\r\n";
$texto .= "Comentarios: ".$_POST["comentarios"]."\r\n";
$cabecera = "From:".$remitente."\n";
$cabecera .= "Reply-To:".$remitente."\n";
$cabecera .= "X-Mailer:PHP/".phpversion()."\r\n";
$cabecera .= "Mime-Version: 1.0 \r\n";
$cabecera .= "Content-Type: text/plain";
$cabecera_html = "From:".$remitente."\r\n";
$cabecera_html .= "Reply-To:".$remitente."\r\n";
$cabecera_html .= "X-Mailer:PHP/".phpversion()."\r\n";
$cabecera_html .= "Mime-Version: 1.0 \r\n";
$cabecera_html .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
$contenido = '
<html>
<head>
<title>Consulta</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 5px;
margin-right: 0px;
margin-bottom: 5px;
background-image: url();
background-color: #2E2E2A;
}
body,td,th {
font-family: Tahoma;
font-size: x-small;
color: #000000;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
<tr>
<td align="left" valign="top"> </td>
<td colspan="2" align="center" valign="top"><strong>Laundry Argentina - Formulario de consulta</strong></td>
</tr>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
<td width="502" align="left" valign="top"> </td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"><strong>Fecha:</strong></td>
<td align="left" valign="top">'.$fecha.'</td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"><strong>Nombre:</strong></td>
<td align="left" valign="top">'.$nombre.'</td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"><strong>email:</strong></td>
<td align="left" valign="top">'.$remitente.'</td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
</tr>
<tr>
<td width="17" align="left" valign="top"> </td>
<td width="81" align="left" valign="top"><strong>Comentario:</strong></td>
<td align="left" valign="top">'.$comentarios.'</td>
</tr>
<tr>
<td width="17"> </td>
<td width="81"> </td>
<td> </td>
</tr>
<tr>
<td colspan="3" width="600"></td>
</tr>
</table>
</body>
</html>';
/* $mensaje = utf8_decode($texto);
mail($para, $subject, $mensaje, $cabecera); */
$mensaje_copia = "Recibimos su consulta, en breve le responderemos";
mail($para, $subject, $contenido, $cabecera_html);
mail($remitente, $subject, $contenido, $cabecera_html);
mail($remitente, $subject, $mensaje_copia, $cabecera_html);
echo "&estatus=ok&";
}
?>
Valora esta pregunta


0