Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/04/2009, 13:39
Avatar de FantasmaFito
FantasmaFito
 
Fecha de Ingreso: junio-2007
Ubicación: Buenos Aires, Argentina
Mensajes: 118
Antigüedad: 16 años, 9 meses
Puntos: 0
Respuesta: enviar formulario desde mi web a mi correo electronico directamente

Hacé una página contacto.php y luego un formulario de contacto mas o menos así:

Código HTML:
<form enctype="multipart/form-data" name="contacto" id="contacto" action="contacto.php" method="post">
                            <br />
                            <label>Nombre</label><br />
                            <input type="text" name="nombre" /><br /><br />
                            <label>Apellido</label><br /><input type="text" name="apellido" /><br /><br />
                            <label>E-mail</label><br/><input type="text" name="mail" /><br />
                            <br />
                            <label>Mensaje</label><br />
                            <textarea name="mensaje"></textarea><br /><br />
                            <input type="submit" value="Enviar"/>
                    	</form> 
y luego le pones el código php:

Código PHP:
if(isset($_POST["nombre"])){
                        
                        
$Name $_POST['nombre']." ".$_POST['apellido'];
                        
$email $_POST['mail'];
                        
$destinatario "[email protected]";
                        
$cuerpo_mail utf8_decode(stripslashes($HTTP_POST_VARS['mensaje']));                        
                        
$asunto "Mail enviado desde mi web";
            
                        
$header "From: "$Name " <" $email ">\r\n";
                        
                        
ini_set('sendmail_from''[email protected]'); 
                        
                        
mail($destinatario$asunto$cuerpo_mail$header);
                        
                        
                    } 
Espero que te sirva, saludos!