I’m working on a site that was recently moved. After the move all the scripts that use the php mail() function AND have MIME-Version: and Content-type in the header fail to display correctly. They show up like this
Delivered-To: asdf@adffdsf.com Received: by 10.114.121.18 with SMTP id t17cs128223wac;
Thu, 19 Nov 2009 11:52:35 -0800 (PST) Received: by 10.231.48.150 with SMTP id s22mr755195ibfdge.22.1258660355109;
Thu, 19 Nov 2009 11:52:35 -0800 (PST) Return-Path: <anonymous@u15366254sdf.onlinehome-server.com> Received: from u15366254.onlinehome-server.com (u15366254.onlinehome-server.com [74.208.194.179])
by mx.google.com with ESMTP id 16si2425376iwn.129.2009.11.19.11.52.34;
Thu, 19 Nov 2009 11:52:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of anonymous@u15366254.onlinehome-server.com designates 74.208.194.179 as permitted sender) client-ip=74.208.194.179; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of anonymous@u15366254.onlinehome-server.com designates 74.208.194.179 as permitted sender) smtp.mail=anonymous@u15386254.onlinehome-server.com Received: (qmail 8341 invoked by uid 48); 19 Nov 2009 08:55:35 -0500 Date: 19 Nov 2009 08:55:35 -0500
Message-ID: <20091119185535.8339.qmail@u15386254.onlinehome-server.com>
To: asdf@asdfad.com
Subject: Retailer Application MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1
From: asdf@asdfad.com
In addition the html in the message shows up raw.
When I use the exact same script to send an email on another server it works as expected. Also the email scripts on the site that use Swift mail work fine.
I could just modify them to use swift but there are many scripts that would have to be edited.
I’m using php 5.1.6.
Any ideas?
I think your problem is related with
\nandQMAIL, the mail function documentation state this.so you if you header are separated by
\r\nyou could probably replace those by single\n.This bug report also provide a solution using a script.