Home » Mail » Mail_Mime » Bug #3169
no body
Details
| Submitted | 2005-01-11 22:50 UTC |
|---|---|
| From | seppbo at web dot de |
| Assigned | sean |
| Status | Closed |
| Package | Mail_Mime |
| PHP Version | 4.3.10 |
| OS | gentoo/linux |
| Roadmaps | (Not assigned) |
Comments
[2005-01-11 22:50 UTC] seppbo at web dot de
Description:
------------
If I try to send an e-mail with mime attachement with the example code modified like below, I recieve the mail without body. The attachment ist inside, but Thunderbird does not show it, and gmx-mail says this e-mail is bad multibound format.
Reproduce code:
---------------
include('Mail.php');
include('Mail/mime.php');
$text = 'Text version of email';
$file = 'Fname_78.xls';
$crlf = "\r\n";
$hdrs = array(
'From' => 'judo@sclotos-berlin.de',
'Subject' => 'Test mime message'
);
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->addAttachment($file,application/octet-stream','Fname_78.xls',true,'8bit')) $body = $mime->get();
$hdrs = $mime->headers($hdrs);
$mail =& Mail::factory('mail');
$mail->send('anyone@web.de', $hdrs, $body);
Expected result:
----------------
Mail with attached file und text in body.
Actual result:
--------------
Mail, but no attachement, no body text.
[2005-01-16 00:06 UTC] seppbo at web dot de
After changing line 5 to
$crlf = "\n";
everything was fine.
(The same change was made in the documentation (http://pear.php.net/manual/en/package.mail.mail-mime.example.php) on 9.1.2005)
Thanks to you, Sean, for your fast replay, it encouraged me, to try it further.