simple mail() question
| From: | Adam Fleming | Date: | Sat, 13 Nov 2004 18:28:54 +0000 |
| Subject: | simple mail() question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-201927@lists.php.net to get a copy of this message | ||
Hello All,
I have a simple mail() question, and I hope a hero can shed some
light. I can't understand why my messages are being encoded, and extra
headers are being added, *before* the message is sent through sendmail.
Infinite Thanks,
Adam
Input:
$more test.php
<?
$header = "Content-Type: text/plain; charset=us-ascii";
mail('joe@test.com', 'subject', 'body', $header);
?>
Expected Result:
$php -d sendmail_path=/bin/cat test.php
To: joe@test.com
Subject: subject
Content-Type: text/plain; charset=us-ascii
body
Actual Result:
$php -d sendmail_path=/bin/cat test.php
To: joe@test.com
Subject: subject
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: BASE64
Ym9keQ==