|
Posted by John W. List on 03/18/05 14:32
I have an unexpected and perplexing problem.
PHP's mail() function is base64 encoding all message bodies as an
ill-formed MIME attachment resulting in the recipient seeing an
uninteligable base64 encoded string. This only happens to my account
with my host and neither I or the sysadmin can see why as there are no
special configuration settings for me. The host is running PHP4.3.10.
Here's what is happening:
This code
<?php
mail ( "me@myhost.tld", "test script", "Foo!", "");
?>
Results in this mail being recieved.
(message starts here)
Delivered-To: me@myhost.tld
<snip all the SMTP Recieved: headers for clarity/>
To: me@myhost.tld
Subject: test script
Message-Id: <20050318103306.5CEE21F805D@mail.myhost.tld>
Date: Fri, 18 Mar 2005 10:33:06 +0000 (GMT)
From: httpd@myhost.tld (httpd)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: BASE64
Rm9vIQ==
(message ends here)
On every other PHP host I've used I would have expected a simple
string "Foo!" instead of the Mime-version stuff and the base64 encoded
string.
I'm sure I can get round this if I have to by using one of the PHP
mail classes that are out there. But I'd prefer not to as one of the
pieces of software I'm using is commercial and if I alter it I'll
invalidate my support for it.
Has anyone else seen this problem? I'd be interested to know what's happening.
John W. List
Navigation:
[Reply to this message]
|