Hola,
tengo un script para mandar un email mediante la función mail(). Funciona bien pero el caso es que me manda el mismo email 3 veces cada vez que lo ejecuto. QUé estoy haciendo mal?
Código PHP:
Ver original$encabezado = "From:".$tunombre."\nReply-To:".$tunombre."\n";
$encabezado .= "Mime-Version: 1.0\n";
$encabezado .= "Content-Type: text/html";
//mensaje
$mensaje = "<html>";
$mensaje .= " <body style='margin: 0; padding: 0'>";
$mensaje .= "<table border=0 cellpadding=0 cellspacing=0 width='100%'>";
$mensaje .= "<tr>";
$mensaje .= "<td width='10'><div style='width:10px'></div></td>";
$mensaje .= "<td width='100%' valign=top>mensaje";
$mensaje .= "<td width='10'><div style='width:10px'></div></td>";
$mensaje .= "</tr>";
$mensaje .= "</table>";
$mensaje .= "<table border=0 cellpadding=0 cellspacing=0 width='100%' align='center'>";
$mensaje .= "<tr>";
$mensaje .= "<td height='20'></td>";
$mensaje .= "</tr>";
$mensaje .= "</table>";
$mensaje .= " </body>";
$mensaje .= "</html>";
//envía el mensaje
mail($email, $asunto, $mensaje, $encabezado);