corrupted attachvent by base64_encode
| From: | Oleg Borzenkov | Date: | Sun, 16 Nov 2003 21:00:54 +0000 |
| Subject: | corrupted attachvent by base64_encode | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169852@lists.php.net to get a copy of this message | ||
Hi, All!
I have a problem with sending binary attachment with mail() function.
To do so I use standart scheme:
chunk_split(base64_encode(fread($f,filesize($filename)))).
The system is FreeBSD4.7, Apache2, PHP 4.3.4
When the attachment is plain text file , it passes well.
By when I use excell, zip and so on, the attachment is corrupted.
I tried various scripts which I found in the internet, so I don't think that
the problem is in my code.
It's looks like the base64_code() function makes something wrong.
Or something wrong is in my system tunes. Maybe php.ini.
I sow in various forums questions like this one. But there was no answers on
them.
Please , explain me what I do wrong . Thank you.