..:: MX Studio Fóruns ::..: goth1c - Viewing Profile - ..:: MX Studio Fóruns ::..

Jump to content

goth1c's Profile User Rating: -----

Reputation: 0 Neutral
Group:
Membros
Active Posts:
7 (0 per day)
Most Active In:
Desenvolvimento de Jogos (6 posts)
Joined:
11-July 06
Profile Views:
650
Last Active:
User is offline Jul 19 2011 11:01 AM
Currently:
Offline

My Information

Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Not Telling Not Telling

Contact Information

E-mail:
Private

Topics I've Started

  1. Problemas <html> no PHP

    11 July 2011 - 04:20 PM

    Olá pessoal,

    Tenho um problema com meu script.

    Ele recebe as variáveis do meu formulário em HTML, sem problemas. Logo quando configuro a impressão dos dados com <html> ele envia ao e-mail, porém não imprime conforme foi definido, mas sim como texto normal.


    Segue código:


    
    <?
    $nome_cliente = $_POST['clie_nome'];
    $rg_cliente = $_POST['clie_rg'];
    $cpf_cliente = $_POST['clie_cpf'];
    
    $nome = $nome_cliente;
    
    $assunto = 'Ficha de Cadastro - Cliente: '.$nome.'';
    
    $msg = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html>
          <head>
          <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
          </head>
    <body>
     <table width="83%" border="1" id="info">
        <tr>
        <td width="182">CPF:</td>
        <td width="256">'.$cpf_cliente.'</td>
        <td width="196">RG:</td>
        <td width="165">'.$rg_cliente.'</td>
      </tr>
    </table></body></html>';
    
    $headers = "De: $nome\n"; 
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    
    $to = 'soumexemplo@gmail.com';
    
    mail($to,$assunto,$headers,$msg);
    


    O e-mail chega tranquilamente, mas ao invés de formatar com <html> ele simplesmente imprime assim:

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html>
    <head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />
    </head>
    <body>
    <table width="83%" border="1" id="info">
    <tr>
    <td width="182">CPF:</td>
    <td width="256">'.$cpf_cliente.'</td>
    <td width="196">RG:</td>
    <td width="165">'.$rg_cliente.'</td>
    </tr>
    </table></body></html>

    como se fosseb texto normal.

    Quando dou um echo "$msg" ele imprime a formatação completa sem erro nem problema nenhum.

    O que pode ser?

    Desde já agradeço.