Sure! **This is the form code the hosting service gave me: <form name="frmContacto" method="post" action="sendbymail.php"> <table width="500px"> <tr> <td> <label for="first_name">Nombre: *</label> </td> <td> <input type="text" name="first_name" maxlength="50" size="25"> </td> </tr> <tr> <td valign="top""> <label for="last_name">Apellido: *</label> </td> <td> <input type="text" name="last_name" maxlength="50" size="25"> </td> </tr> <tr> <td> <label for="email">Direccion de E-mail: *</label> </td> <td> <input type="text" name="email" maxlength="80" size="35"> </td> </tr> <tr> <td> <label for="telephone">Numero de telefono:</label> </td> <td> <input type="text" name="telephone" maxlength="25" size="15"> </td> </tr> <tr> <td> <label for="comments">Comentarios: *</label> </td> <td> <textarea name="comments" maxlength="500" cols="30" rows="5"></textarea> </td> </tr> <tr> <td colspan="2" style="text-align:right"> <input type="submit" value="Enviar"> </td> </tr> </table> </form> **This is the PHP script the hosting service gave me: <?php if(isset($_POST['email'])) { // Debes editar las próximas dos lÃneas de código de acuerdo con tus preferencias $email_to = "contact@myemail.com"; $email_subject = "Contacto desde el sitio web"; // Aquà se deberÃan validar los datos ingresados por el usuario if(!isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) { echo "<b>Ocurrio un error y el formulario no ha sido enviado. </b><br />"; echo "Por favor, vuelva atrás y verifique la información ingresada<br />"; die(); } $email_message = "Detalles del formulario de contacto:\n\n"; $email_message .= "Nombre: " . $_POST['first_name'] . "\n"; $email_message .= "Apellido: " . $_POST['last_name'] . "\n"; $email_message .= "E-mail: " . $_POST['email'] . "\n"; $email_message .= "Teléfono: " . $_POST['telephone'] . "\n"; $email_message .= "Comentarios: " . $_POST['comments'] . "\n\n"; // Ahora se envÃa el e-mail usando la función mail() de PHP $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); echo "¡El formulario se ha enviado con exito!"; } ?> **This is my original php script, that no longer works... aparently it must have my email in the script. <?php /* Created on: 02/05/2007 */ ?> <?php $to = $_GET["Email"] . "@" . $_GET["Dominio"]; $from = $_GET["From"] . "@" . $_GET["Dominio"]; $correo = $_GET["Email"]; //Datos para procesar el correo $respuesta = $_GET["Confirmacion"]; $from = $_GET["Correo"]; $replyto = $_GET["ReplyTo"]; $subject = $_GET["Subject"]; //Servidor de correo del cliente. Siempre va mail.dominio por ejemplo: mail.syop.com.mx //$server = "mail.inventsa.com"; $server = "mail.".$_GET["Dominio"].""; //Variables que recibe de estilo $nombre_empresa= $_GET["Empresa"]; $font = $_GET["font"]; $color_titulo = $_GET["c_tit"]; $background_titulo = $_GET["b_tit"]; $color_subtitulo = $_GET["c_stit"]; $background_subtitulo = $_GET["b_stit"]; //VALIDACIONES PARA TODOS LOS CAMPOS //|| $server == "mail.sysop.com.mx" if($server == "" ){ echo "Tienes un error en la forma de contacto, no has cambiado el servidor de correo."; exit; } else if ( $_GET["Email"] == "" || $_GET["Dominio"] == "" || $subject == "" || $_GET["From"] == ""){ echo "No estas mandando los campos escondidos para procesar el correo. <br/> Estos campos pueden ser Email, Dominio o From."; exit; } else if ( $nombre_empresa == " " || $font == "" || $color_titulo== "" || $background_titulo== "" || $color_subtitulo== "" || $background_subtitulo== ""){ echo "No estas mandando todos los campos para personalizar el correo. <br/> Revisa los hiddens de tu forma de contacto."; exit; } if($respuesta == ""){ echo "Tienes un error en la forma de contacto, falta mandar la confirmación."; exit; } //Se borran las variables que no queremos que imprima en el correo. unset ($_GET['Enviar']); unset ($_GET['Submit']); unset ($_GET['Email']); unset ($_GET['Dominio']); unset ( $_GET["Confirmacion"]); unset ($_GET["Empresa"]); unset ($_GET["font"]); unset ($_GET["c_tit"]); unset ($_GET["b_tit"]); unset ($_GET["c_stit"]); unset ($_GET["b_stit"]); //Headers que tiene que tener para mandar el correo en html. $headers = "From: $from\r\n" . "Content-Type: text/html; ". "charset=UTF-8; format=flowed\n". "MIME-Version: 1.0\n". "Content-Transfer-Encoding: 8bit\n ". "X-Mailer: PHP\n"; // Se tienen las variables en el arreglo $Get y se les asigna llave y valor para imprimir. foreach ($_GET as $key => $value) { $body.= ' <tr class="fondo"> <td width="16%" class="left"> '.$key.':</td> <td width="84%"> '.$value.'</td> </tr>'; } $mensaje= ' <html> <head> <title>----Forma de Contacto----</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"> .ancho{ height:40px; } body{ font-family:Lucida Sans; font-size:12px; color:#646464; } .borderright{ border-right:medium; border-right-width:medium; border-right-color:#D3D3D3; border-right-style:solid; } .borderbottom{ border-bottom:medium; border-bottom-width:medium; border-bottom-color:#D3D3D3; border-bottom-style:solid; } .fondo{ background-color:#fff; } .left{ padding-left:30px; font-weight:bold; } .subtitulo{ font-family:'.$font.'; font-size:14px; color:'.$color_subtitulo.'; background-color:'.$background_subtitulo.'; padding-top:5px; padding-left:20px; text-align:center; font-style:italic; font-weight:bold; } .titulo{ font-family:'.$font.'; font-size:20px; color:'.$color_titulo.'; padding-top:5px; padding-left:20px; background-color:'.$background_titulo.'; } </style> </head> <body> <table width="50%" border="0" cellpadding="0" cellspacing="2" class="borderright borderbottom"> <tr> <td colspan="2" class="titulo ancho">'.$nombre_empresa.'</td> </tr> <tr> <td colspan="2" class="subtitulo">El Solicitante introdujo los siguientes campos </td> </tr> '.$body.' <tr> <td> </td> <td align="right" style="font-size:12px; font-family:Times New Roman, Times, serif; color:#001a78;">APISA</td></tr> </table> </body> </html>'; //Manda el correo mail("$to", "$subject", "$mensaje", "$headers"); //Se hace un location hacia la p?na de respuesta que se env?como par?tro. print "<script>document.location.href='$respuesta'</script>"; ?> <html> <?php print "Mail enviado exitosamente"; ?> </body> </body> </html> **Hope its not a problem that its in spanish.
... View more