Ir para conteúdo
Fórum Script Brasil
  • 0

Formulario de email


Victor Hugo Marques

Pergunta

Bom dia pessoal, estou precisando de uma ajuda, estou tentando identificar este erro porém não estou conseguindo.

Eu fiz o seguinte formulario de e-mail

<form action="../contato/requestConnection.php" method="post" name="formulario">
                  <fieldset>
                      <legend id="close_field">X</legend>
                    <legend>Solicitação de Ligação</legend>
                    <span>Preencha o formulario abaixo para a equipe NGN entrar em contato</span><br /><br />
                    <label for="name">Nome</label>
                        <input style="margin-left: 34px;" type="text" name="nome" size="34" /><br />
                    <label for="telepony">Telefone</label>
                        <input style="margin-left: 15px;" type="text" name="telefone" id="telefone" size="34" /><br />
                    <label for="telepony">Assunto</label>
                        <input style="margin-left: 19px;" type="text" name="assunto" size="34" /><br />
                    <input id="buttons" type="submit" name="Enviar" value="Enviar" />
                    <input id="buttons" type="reset" name="Limpar" value="Apagar" />
                  </fieldset>
                </form>
com a seguinte logica:
<?php

    $hoje_tmp = getdate();
    $hoje = ($hoje_tmp[hours].":".$hoje_tmp[minutes].":".$hoje_tmp[seconds]);
    $nome = $_POST["nome"];
    $telefone = $_POST["telefone"];
    $assunto = $_POST["assunto"];
    $message = '    
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Solicitação de Ligação | NGN Engenharia</title>
</head>

<body>

    <div style=" border: 1px solid #391010; border-radius: 10px 21px 21px 21px; margin:0 auto; width: 400px; height: auto; background-color: #ECECEC; padding: 50px; color: white;">
        <div style="
        background-image: linear-gradient(right bottom, rgb(65,119,138) 0%, rgb(20,23,56) 100%, rgb(64,73,173) 100%);
        background-image: -o-linear-gradient(right bottom, rgb(65,119,138) 0%, rgb(20,23,56) 100%, rgb(64,73,173) 100%);
        background-image: -moz-linear-gradient(right bottom, rgb(65,119,138) 0%, rgb(20,23,56) 100%, rgb(64,73,173) 100%);
        background-image: -webkit-linear-gradient(right bottom, rgb(65,119,138) 0%, rgb(20,23,56) 100%, rgb(64,73,173) 100%);
        background-image: -ms-linear-gradient(right bottom, rgb(65,119,138) 0%, rgb(20,23,56) 100%, rgb(64,73,173) 100%);
        background-image: -webkit-gradient(
            linear,
            right bottom,
            left top,
            color-stop(0, rgb(65,119,138)),
            color-stop(1, rgb(20,23,56)),
            color-stop(1, rgb(64,73,173))
        );
        box-shadow: 1px 7px 9px -2px #010101; border-radius: 10px 30px 215px 0; display: block; margin: -50px; padding: 50px; background-color: #391010;     
        border-bottom: 1px solid; margin-bottom: 0px; 
            ">
            <h4 style=" top: 5px; color: #FFFFFF; font-family: Helvetica; font-weight: lighter; position: absolute; text-align: center; text-shadow: 4px 3px 3px #000000;
            width: 415px; ">NGN ENGENHARIA</h4>
            <h3 style=" top: 5px; color: #FFFFFF; font-family: Helvetica; font-weight: lighter; font-size: large; position: relative; text-align: justify; text-shadow: 4px 3px 3px #000000;
            width: 415px; ">Este e-mail é referente a uma solicitação de ligação do website.</h3>
        </div>
        <br />
        <br />
        <h4 style=" box-shadow: 0px 0px 10px 0px #696969; border: 1px solid #696969; background-color: #485360; padding: 10px; text-align: center; font-family: Helvetica; ">Dados do Cliente</h4>
        <div style=" background-color: #CCCCCC; color: #000000; display: block; font-family: Arial; font-weight: bold; padding: 8px; ">
            Nome:&nbsp;&nbsp;&nbsp;
            <span style=" font-weight: lighter; font-size: small; ">'.$nome.'</span>
        </div>
        <br />
        <div style=" background-color: #CCCCCC; color: #000000; display: block; font-family: Arial; font-weight: bold; padding: 8px; ">
            Assunto:&nbsp;&nbsp;&nbsp;
            <span style=" font-weight: lighter; font-size: small; ">'.$assunto.'</span>
        </div>
        <br />
        <div style=" background-color: #CCCCCC; color: #000000; display: block; font-family: Arial; font-weight: bold; padding: 8px; ">
            Telefone:&nbsp;&nbsp;&nbsp;
            <span style=" font-weight: lighter; font-size: small; ">'.$telefone.'</span>
        </div>
    </div>

</body>
</html>
            ';    
    $header = "from: ".$email."\n";
    $header .= "MIME-Version: 1.0\r\n";
    $header .= "Content-type: text/html; charset=utf-8";
    $header .= "X-Mailer: PHP4 Script Language\n";
    $header .= "X-Accept-Language: en\n";
    $header .= "Content-Transfer-Encoding: 7bit\n";

    global $email;

    $enviou = mail("victorh.marques66@gmail.com",
                    "$assunto",
                    "$message",
                    "$header",
                    "From: $email <$nome>");

    if ($enviou){
        header('location:email_sent.html');
    } else {
        header('location:email_notSent.html');
    }

?>

O que acontece é o seguinte, quando eu vou ao servidor usar o formulario, ele redireciona para a pagina 'email_sent.html', porém o e-mail nunca chega na caixa postal.

se alguém souber ajudar muito obrigado.

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...