1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Problems with HTML e-mail sending (PHP)

Discussion in 'Software' started by ChriX, 28 Jun 2007.

  1. ChriX

    ChriX ^

    Joined:
    30 Aug 2001
    Posts:
    2,651
    Likes Received:
    4
    I was using this function fine on a hosting account with 1&1 for a while (http://www.web-max.ca/PHP/misc_20.php), now I have moved the site over to a dedicated server (FC6) only to find that the messages it sends don't seem to get decoded by Outlook (or anything i've tried), you just see the source of the message - 'Content-Type: multipart/'... etc.

    I guess it is something on the server that is different, as far as I can see all the php.ini values are in order, and don't have a clue where to look now. All suggestions welcome! :D
     
  2. Jamie

    Jamie ex-Bit-Tech code junkie

    Joined:
    12 Mar 2001
    Posts:
    8,180
    Likes Received:
    54
    If you can, post the source that outlook is receiving or that is being sent.
     
  3. ChriX

    ChriX ^

    Joined:
    30 Aug 2001
    Posts:
    2,651
    Likes Received:
    4
    Sure, this is the source of a message received.

    Code:
    Return-path: <apache@serverdomain.com>
    Envelope-to: [email]chrix@mydomain.net[/email]
    Delivery-date: Thu, 28 Jun 2007 13:18:26 +0000
    Received: from serverhostname.net ([serverip] helo=serverdomain.com)
    	by mx0.thdo.mydomain.net with esmtp (Exim 4.50)
    	id 1I3tt6-0004fB-3U
    	for [email]chrix@mydomain.net[/email]; Thu, 28 Jun 2007 13:18:26 +0000
    Received: by serverdomain.com (Postfix, from userid 48)
    	id 8F46F6D641; Thu, 28 Jun 2007 14:18:13 +0100 (BST)
    To: [email]chrix@mydomain.net[/email]
    Subject: Contact Us form submitted
    From: Website mailer
    MIME-Version: 1.0
    Content-Type: multipart/alternative;boundary = HTMLEMAIL4683b51589292
    Message-Id: <20070628131813.8F46F6D641@serverdomain.com>
    Date: Thu, 28 Jun 2007 14:18:13 +0100 (BST)
    X-Spam-Score: 1.2 (+)
    X-Spam-Status: No, hits=1.2 required=5.0 tests=BAYES_50,FORGED_RCVD_HELO,TRACKER_ID autolearn=no version=3.1.1
    X-Scan-Signature: a7112831c8db0cfbf1e8779c2ff5c373
    
    
    
    This is a MIME encoded message.
    
    
    
    --HTMLEMAIL4683b51589292
    
    Content-Type: text/plain; charset=ISO-8859-1
    
    Content-Transfer-Encoding: base64
    
    <snip (encoded message)>
    
    --HTMLEMAIL4683b51589292
    
    Content-Type: text/html; charset=ISO-8859-1
    
    Content-Transfer-Encoding: base64
    
    <snip (encoded message)>
    Could it be something to do with the character set/encoding? I remember having to change that used by Apache when I first setup the server due to pound signs not displaying correctly.
     
  4. Fophillips

    Fophillips What's a Dremel?

    Joined:
    9 Oct 2006
    Posts:
    948
    Likes Received:
    1
    You could try using UTF-8, I'm not sure if it will work though.
     
  5. Jamie

    Jamie ex-Bit-Tech code junkie

    Joined:
    12 Mar 2001
    Posts:
    8,180
    Likes Received:
    54
    Are you missing --HTMLEMAIL4683b51589292-- at the end?
     
  6. Draxin

    Draxin Seeker of Photons

    Joined:
    29 Nov 2001
    Posts:
    965
    Likes Received:
    5
    your sending a content-type of text/plain and a content-type of text/html

    try removing the text/plain and only send the one content-type header

    and using a utf-8 wouldnt hurt
     

Share This Page