Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php if(isset($_POST['acao']{
  2. $nome = strip_tags(filter_input(INPUT_POST, 'nome'));
  3. $email = strip_tags(filter_input(INPUT_POST, 'email'));
  4. $assunto = strip_tags(filter_input(INPUT_POST, 'assunto'));
  5. $mensagem = strip_tags(filter_input(INPUT_POST, 'mensagem'));
  6. if($nome == '' || $email == '' || $assunto == '' || $mensagem == ''){
  7. echo 'preencha todos os campos corretamente';
  8. die();
  9. }else{
  10. include_once("sendmail.php");
  11. //se conseguir enviar o email retorna outro email persoanalizado pro cliente
  12. if(sendMail($assunto, $mensagem, $email, $nome, 'email@seuhost.com', 'Nome')){
  13. sendMail('recebemos seu e-mail', 'aqui a mensagem de confirmação!', 'email@seuhost.com', 'Nome', $email, $nome);
  14. echo 'email enviado com sucesso';
  15. }
  16. }
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement