Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/05/2012, 17:40
fedexcba
 
Fecha de Ingreso: mayo-2012
Mensajes: 4
Antigüedad: 11 años, 11 meses
Puntos: 0
Como hacer para que los mensajes de mi formulario llegue a 5 e-mails?

Tal vez lo mio sea una tonteria entrar pero como recien estoy aprendiendo pregunto aca.

Yo descargue este formulario pero no se como hacer para que me envie a mas de una direccion de e-mail. Es que el formulario no solo llegue al e-mail principal, sino que tambien a otros 5 mas, como tendria que modificar este codigo? si alguien me dice se lo voy agradecer!!!

Cita:
<?php
$aviso = "";
// check form
if ($_POST['email'] != "") {
// email de destino
$email = "[email protected]";

// asunto del email
$subject = "Contacto";

// Cuerpo del mensaje
$mensaje = "---------------------------------- \n";
$mensaje.= " Contacto \n";
$mensaje.= "---------------------------------- \n";
$mensaje.= "NOMBRE: ".$_POST['nombre']."\n";
$mensaje.= "EMPRESA: ".$_POST['empresa']."\n";
$mensaje.= "EMAIL: ".$_POST['email']."\n";
$mensaje.= "TELEFONO: ".$_POST['telefono']."\n";
$mensaje.= "FECHA: ".date("d/m/Y")."\n";
$mensaje.= "HORA: ".date("h:i:s a")."\n";
$mensaje.= "IP: ".$_SERVER['REMOTE_ADDR']."\n\n";
$mensaje.= "---------------------------------- \n\n";
$mensaje.= $_POST['mensaje']."\n\n";
$mensaje.= "---------------------------------- \n";
$mensaje.= "Enviado desde http://blog.unijimpe.net \n";

// headers del email
$headers = "From: ".$_POST['email']."\r\n";

// Enviamos el mensaje
if (mail($email, $subject, $mensaje, $headers)) {
$aviso = "Su mensaje fue enviado correctamente";
} else {
$aviso = "Error de envío";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Enviar Email con PHP - unijimpe</title>
<style type="text/css">
body {
margin: 16px;
padding: 0;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
}
input, textarea {
float: left;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
padding: 2px;
width: 250px;
margin-bottom: 4px;
}
label {
float: left;
width: 100px;
}
button {
width: 80px;
background: #333;
color: #FFF;
padding: 3px 8px;
}
form {
border: solid 1px #CCC;
background: #efefef;
padding: 16px;
width: 380px;
}
br { clear: both; }
em { color: red; }
</style>
</head>
<body>
<h2>Enviar Email con PHP</h2>
<?php if ($aviso != "") { ?>
<p><em><?php echo $aviso; ?></em></p>
<?php } ?>
<form action="" method="post">
<label for="nombres">Nombres</label> <input name="nombre" id="nombre" type="text" /><br />
<label for="empresa">Empresa</label> <input name="empresa" id="empresa" type="text" /><br />
<label for="email">Email</label> <input name="email" id="email" type="text" /><br />
<label for="telefono">Telefono</label> <input name="telefono" id="telefono" type="text" /><br />
<label for="mensaje">Mensaje</label> <textarea name="mensaje" cols="30" rows="6"></textarea><br />
<label for="btsend">&nbsp;</label> <button name="btsend" id="btsend" type="submit">Enviar</button>
</form>
</body>
</html>