Quantcast
Channel: Últimos conteúdos
Viewing all articles
Browse latest Browse all 14190

Acentuação

$
0
0

Amigos, estou com um problema de acentuação em um formulário php. Quando recebo o email ele não vem acentuado.

 

Vou enviar os codigos do html e do php para se algum consegue me ajudar onde esta o erro.

 

Html (topo e formulário)

<title>| GARRA TELECOM |</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form method="post" action="enviar_fale.php">	

<input id="txtdest" name="txtdest" type="hidden" value="sac@garratelecom.com.br"/>

<input id="txtass" name="txtass" type="hidden" value="Fale Conosco - Canaa dos Carajas" />

<label for="name">Nome:</label>     <input  class="textbox" type="text" name="nome" id="nome" /><br>

<label for="email">E-mail:</label>     <input  class="textbox" type="text" name="email2" id="email2" /><br>

<label for="subject">Telefone: </label><input  class="textbox" type="text" name="telefone" id="telefone" /><br>

<textarea class="textbox" name="txtmsg" id="txtmsg" style="width:375px; height:150px;"></textarea>

<button class="button small-btn" type="submit" name="submit" id="submit">Enviar Mensagem</button> <br />

<p id="message-outcome"></p>

</form>

PHP

<html>
<body>

<?php

	header('Content-Type: text/html; charset=utf-8');

If (isset($_POST['txtdest']))
{
    require_once('class.phpmailer.php');
    $destino = $_POST['txtdest'];
    $nome = $_POST['nome'];
    $telefone = $_POST['telefone'];
    $email2 = $_POST['email2'];
    $assunto = $_POST['txtass'];
    $mensagem = $_POST['txtmsg'];
    $mailer = new PHPMailer();
    $mailer->IsSMTP();
    $mailer->SMTPDebug = 1;
    $mailer->Port = 587; //Indica a porta de conexão para a saída de e-mails
    $mailer->Host = 'smtp.garratelecom.com.br'; //smtp.dominio.com.br
    $mailer->SMTPAuth = true; //define se haverá ou não autenticação no SMTP
    $mailer->Username = 'sac@garratelecom.com.br'; //Informe o e-mai o completo
    $mailer->Password = ''; //Senha da caixa postal
    $mailer->FromName = $assunto; //Nome que será exibido para o destinatário
    $mailer->From = 'sac@garratelecom.com.br'; //Obrigatório ser a mesma caixa postal indicada em "username"
    $mailer->AddAddress('sac@garratelecom.com.br'); //Destinatários
    $mailer->Subject = $assunto;
    $mailer->Body = "Nome: $nome

Email: $email2

Telefone: $telefone

Mensagem: $mensagem";
    $mailer->Send();
    echo "<script>location.href='fale.php'</script>";
}
	?>
</body>
</html>


Viewing all articles
Browse latest Browse all 14190