Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal,
Pensei em colocar CSS e HTML no meu formulário, porém o e-mail chega com o código fonte.
Será que é erro no meu código?
<?php
$nome = $_POST["nome"];
$email = $_POST["email"];
$assunto = $_POST["assunto"];
$mensagem = nl2br($_POST['mensagem']);
$texto_html = <<<HTML
<STYLE type="text/css">
.titulo{
font-family: Verdana, helvetica;
font-weight: bold;
font-size: 12px;
}
.texto {font-size: 11px; font-family: verdana, helvetica; text-decoration: none; color: #666666; line-height: 20px; }
a.texto {font-size: 11px; font-family: verdana, helvetica; text-decoration: underline; color: #666666 }
a.texto:link {font-size: 11px; font-family: verdana, helvetica; text-decoration: underline; color: #666666 }
a.texto:active {font-size: 11px; font-family: verdana, helvetica; text-decoration: underline; color: #666666 }
a.texto:visited {font-size: 11px; font-family: verdana, helvetica; text-decoration: underline; color: #666666 }
a.texto:hover {font-size: 11px; font-family: verdana, helvetica; text-decoration: underline; color: #ff0000 }
.texto_dest {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: none; color: #333333 }
a.texto_dest {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: #333333 }
a.texto_dest2 {font-size: 12px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: Red }
a.texto_dest:link {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: #333333 }
a.texto_dest:active {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: #333333 }
a.texto_dest:visited {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: #333333 }
a.texto_dest:hover {font-size: 11px; font-family: verdana, helvetica; font-weight: bold; text-decoration: underline; color: #ff0000 }
</STYLE>
<TABLE width="90%" border="0" cellspacing="0" cellpadding="8">
<TR>
<TD bgcolor="#ffffff" align="left" class="bordasolida">
<SPAN class="titulo"><b>CONTATO - WEBSITE</b> </SPAN><BR>
<SPAN class="texto">
<BR>
<p>
<strong>Nome:</strong> $nome<br>
<strong>E-mail:</strong> $email<br>
<strong>Assunto:</strong> $assunto<br>
<strong>Mensagem:</strong> <BR>
$mensagem <BR>
</p>
<BR>
</SPAN>
</TD>
</TR>
</TABLE>
HTML;
$assunto = "";
$headers = "From: $nome <$email> \nContent-type: text/html; charset=iso-8859-1 \r\n";
mail("",$assunto,$texto_html, $headers);
echo "success=yes";
?>
ObrigadoCarregando comentários...