Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $para = "seuemail@seudomino.com.br";
- $subject = "Form de contato teste";
- $nome = $_POST['nome'];
- $email = $_POST['email'];
- $assunto = $_POST['assunto'];
- $mensagem = $_POST['mensagem'];
- $replyto = $from = $email;
- // envia o email
- $headers = "From: $from \n";
- $headers.= "Reply-to: $replyto\n";
- $headers.= "Return-Path: $replyto\n";
- $headers.= "X-Mailer: PHP Mail ver".phpversion()."\n"; // mailer
- $headers.= "Content-type:text/html \n\r";
- $texto = "Nome: $nome <br>";
- $texto.= "E-mail: $email <br>";
- $texto.= "Assunto: $assunto <br>";
- $texto.= "Mensagem: $mensagem <br>";
- if(!mail($para,$subject,$texto,$headers,"-f $from")){
- die("erro ao enviar o email");
- }
- ?>
- seu email foi enviado com sucesso.
Add Comment
Please, Sign In to add comment