Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Pessoal, nunca fui muito bom em web, mas de vez em quando arrisco algumas coisas. E dessa vez não consigo fazer um simples formmail funcionar.
Desculpe a idiotice, mas alguem sabe me dizer pq não está enviando o email?
Seguem os códigos.
Do html
<form name="form1" method="post" action="pagamento1.php" class="conteudo">
<font color="ff6600">Esta assinatura é:
<input name="assinaturaPara" type="checkbox" id="assinaturaPara" value="ParaMim">Para mim
<input name="assinaturaPara" type="checkbox" id="assinaturaPara" value="ParaPresente">Para presente </font>
<br>
Tipo de Assinatura:
<input name="tipoAssinatura" type="checkbox" id="tipoAssinatura" value="PessoaFisica">Pessoa Física
<input name="tipoAssinatura" type="checkbox" id="tipoAssinatura" value="PessoaJuridica">Pessoa Jurídica
<br><br><br>
<table width="570" border="0" cellspacing="0" cellpadding="0" bgcolor="#FF9900" class="tituloLaranja">
<tr>
<td>DADOS PESSOAIS</td>
</tr>
</table>
<br>
<strong>Nome:</strong>
<input name="nome" type="text" id="nome" size="88">
<br><BR>
<strong>Data de Nascimento:</strong>
<input name="dataNascimento" type="text" id="dataNascimento" size="7">
Sexo:
<input name="sexo" type="checkbox" id="sexo" value="Masculino">Masculino
<input name="sexo" type="checkbox" id="sexo" value="Feminino">Feminino
<br><BR>
<strong>CPF ou CNPJ:</strong>
<input name="cpf" type="text" id="cpf" size="25">
<strong>RG:</strong>
<input name="rg" type="text" id="rg" size="25">
<br><br>
<strong>Endereço:</strong>
<input name="endereco" type="text" id="endereco" size="88">
<br><br>
<strong>Complemento:</strong>
<input name="complemento" type="text" id="complemento" size="88">
<br><br>
<strong>Bairro:</strong>
<input name="bairro" type="text" id="bairro" size="18">
<strong>Cidade:</strong>
<input name="cidade" type="text" id="cidade" size="18">
<strong>UF:</strong>
<input name="uf" type="text" id="uf" size="2">
<br><br>
<strong>CEP:</strong>
<input name="cep" type="text" id="cep" size="26">
<strong>Referência:</strong>
<input name="referencia" type="text" id="referencia" size="26">
<br><br>
<strong>E-mail:</strong>
<input name="email" type="text" id="email" size="80">
<br><br>
<strong>Telefone Residencial (DDD):</strong>
<input name="dddResidencial" type="text" id="dddResidencial" size="1">
<input name="telResidencial" type="text" id="telResidencial" size="26">
<br><br>
<strong>Telefone Celular (DDD):</strong>
<input name="dddCelular" type="text" id="dddCelular" size="1">
<input name="telCelular" type="text" id="telCelular" size="26">
<br><br>
<strong>Telefone Comercial (DDD):</strong>
<input name="dddComercial" type="text" id="dddComercial" size="1">
<input name="telComercial" type="text" id="telComercial" size="26">
<br><br>
<input name="receberSms" type="checkbox" id="receberSms" value="smsSim">Sim, aceito receber mensagens sms informativos e alertas sobre minha assinatura.
<br>
<input name="receberSms" type="checkbox" id="receberSms" value="smsNao">Não aceito receber mensagens sms informativos e alertas sobre minha assinatura.
<br><br>
<div class="textoDeLegenda"> Suas informações serão armazenadas dentro dos mais rígidos critérios de segurança no banco de dados da Di Comunicação e serão tratadas de acordo com o código de ética da ABEMD - Associação Brasileira de Marketing Direto (para detalhes sobre o código, visite o site www.abemd.org.br). Você poderá receber informações sobre novidades, convites para eventos, promoções especiais e ofertas diferenciadas da nossa empresa e de empresas parceiras.</div>
<br><br><br>
<table width="570" border="0" cellspacing="0" cellpadding="0" bgcolor="#FF9900" class="tituloLaranja">
<tr>
<td>DADOS PARA ENTREGA</td>
</tr>
</table>
<br>
<input name="enderecoEntrega" type="checkbox" id="enderecoEntrega" value="mesmoEndereco">Mesmo endereço do titular da assinatura. <br>
<font size="-1" color="#FF9900">(se a resposta for sim, marque a caixa e pule esta etapa)</font>
<br><BR><br>
<strong>Destinatário:</strong>
<input name="destinatario" type="text" id="destinatario" size="44">
<strong>CEP:</strong>
<input name="cepEntrega" type="text" id="cepEntrega" size="9">
<br><br>
<strong>Endereço:</strong>
<input name="enderecoEntrega" type="text" id="enderecoEntrega" size="88">
<br><br>
<strong>Complemento:</strong>
<input name="complementoEntrega" type="text" id="complementoEntrega" size="23">
<strong>Referência:</strong>
<input name="referenciaEntrega" type="text" id="referenciaEntrega" size="23">
<br><br>
<strong>Bairro:</strong>
<input name="bairroEntrega" type="text" id="bairroEntrega" size="20">
<strong>Cidade:</strong>
<input name="cidadeEntrega" type="text" id="cidadeEntrega" size="18">
<strong>UF:</strong>
<input name="ufEntrega" type="text" id="ufEntrega" size="2">
<br><br><br><br><br><br>
<input align="right" value="enviar" name="submit" type="image" src="imagens/avancar1.gif" border="0">
</form>
</td>
Do PHP
<?
$assinaturaPara = $_POST['assinaturaPara'];
$tipoAssinatura = $_POST['tipoAssinatura'];
$nome = $_POST['nome'];
$dataNascimento = $_POST['dataNascimento'];
$sexo = $_POST['sexo'];
$cpf = $_POST['cpf'];
$rg = $_POST['rg'];
$endereco = $_POST['endereco'];
$complemento = $_POST['complemento'];
$bairro = $_POST['bairro'];
$cidade = $_POST['cidade'];
$uf = $_POST['uf'];
$cep = $_POST['cep'];
$referencia = $_POST['referencia'];
$email = $_POST['email'];
$dddResidencial = $_POST['dddResidencial'];
$telResidencial = $_POST['telResidencial'];
$dddCelular = $_POST['dddCelular'];
$telCelular = $_POST['telCelular'];
$dddComercial = $_POST['dddComercial'];
$telComercial = $_POST['telComercial'];
$receberSms = $_POST['receberSms'];
$enderecoEntrega = $_POST['enderecoEntrega'];
$destinatario = $_POST['destinatario'];
$cepEntrega = $_POST['cepEntrega'];
$complementoEntrega = $_POST['complementoEntrega'];
$referenciaEntrega = $_POST['referenciaEntrega'];
$bairroEntrega = $_POST['bairroEntrega'];
$cidadeEntrega = $_POST['cidadeEntrega'];
$ufEntrega = $_POST['ufEntrega'];
$para = "gapessoal@gmail.com";
$assunto = "Nova Assinatura";/*aqui foram definidos: o local onde será enviado o e-mail($para)
o assunto do e-mail enviado ($assunto)
e a mensagem enviada ($mensagem) que contém todos os campos preenchido no formulário*/
mail($para, $assunto, $mensagem);
?>
Se alguém puder ajudar, desde já agradeço.
abraço
Carregando comentários...