From: pjsmith at microtech dot co dot gg
Operating system: Windows 2003, IIS, ISAPI
PHP version: 4.3.3
PHP Bug Type: *Mail Related
Bug description: Mail() function is loosing cahracters when sending mail

Description:
------------
If you try to mail a string such as

recur-bill:
notes:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see [url]http://www.gnupg.org[/url]

iQCVAwUBP1R7lxOu+5gqBlaxAQHHqgQAqPNOlWVQWak4SQ6XUy IBu3c+09EE08lH
MR8mlRGzxy6LZd8MFxmnVjSMyDQJMDWlNwfRFdIokKTI0zDV2I U74GAct9VyPF5D
gW+cGXh7xyLdDBrq5BvjRlZ4iLspdgm1WHyZACV/DNikYTiax+XjYG34rCiN20Bn
3fqcGVXaGFM=
=syYY
-----END PGP SIGNATURE-----

With a pgp signature, it seems to be missing 1 character of the first line
of the signature, breaking it. This worked flawslessly with 4.3.2. When
we upgraded yesterday, this started happening. I've spent several hours
on this and it would appear that the mail() function is at fault.

Reproduce code:
---------------
Mail a pgp signed sig such as in the desciption and check the sig before
and after sending. My messages are about 1,220 bytes in length on average
with the sig at the bottom

The code I'm usnig is
$apptext=fread($domapp,filesize("uk_apps\\$appname ". "_modify.asc"));
fclose($domapp);
mail("$recipient", "MODIFY", "$apptext",
"From: <hostmastermicrotech.co.gg>\r\nMessage-Id: <" . time() .
"microtech.co.gg>\r\nReply-To: <hostmastermicrotech.co.gg>\r\nX-Mailer:
PHP/" . phpversion());


Expected result:
----------------
It to send the mail with the string as supplied.


--
Edit bug report at [url]http://bugs.php.net/?id=25357&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25357&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25357&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25357&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25357&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25357&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25357&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25357&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25357&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25357&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25357&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25357&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25357&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25357&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25357&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25357&r=gnused[/url]