SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html email problem sendin through php..

    Probably wrong forum but I guess this is my best choice because it is send with php.

    Ok here is the problem the email works in Hotmail although it deforms my html..
    but in gmail i only get to see the html code?

    Also Hotmail filters out images in css? Is there a way to get it working in all email clients? Gmail does support html emails so there must be something wrong with my code :s

    The code that i send is the following:

    Html:

    PHP Code:
    $content = <<<EOD
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <title>Order</title>
    </head>
    <body>

    $this->cssEmail


    <div id="container">
    <div id="logo"></div>
      <h1>
    $name</h1>
      
    $this->invoice
      <table width="100%"  border="0" class="orderTable">
          <tr>
           <th class="tableHead">Merk</th>
           <th class="tableHead">Model</th>
           <th class="tableHead">Kleur</th>
           <th class="tableHead">Maat</th>
           <th class="tableHead">Aantal</th>
          </tr>
         
    $orderdProducts
      </table>
    </div>
        
    </body>
    </html>
    EOD; 
    And I Send it with:

    PHP Code:
    function mailOrder($content$subject$recipient
        {
        
    $headers  "MIME-Version: 1.0\r\n";
        
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        
    /* additional headers */
        
    $headers .= "From: $this->emailStore\r\nReply-To: $this->emailStore\r\nX-Mailer: DT_formmail\r\n";
        
    $headers .= "Cc:"
        
    mail($recipient$subject$content,$headers);
        } 
    Go visit my site :-D you know you want to ;-)
    www.mech7.net

  2. #2
    SitePoint Guru
    Join Date
    Jul 2004
    Location
    Netherlands
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind i am using the phpmailer class working fine now
    Go visit my site :-D you know you want to ;-)
    www.mech7.net


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •