I use mime_mail.inc and do the following:
$mail = new mime_mail;
$mail->from = "xxx";
$mail->to = "xxx";
$mail->subject = "xxx";
$mail->body = "xx";
$mail->add_attachment($data, $filename, $content_type);
$mail->send();
and I got the following email:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary = b2872505d5695ba62fceb2dd8670e630f
This is a MIME encoded message.
--b2872505d5695ba62fceb2dd8670e630f
Content-Type: text/html
Content-Transfer-Encoding: base64
... the body as html with base 64 encoding
--b2872505d5695ba62fceb2dd8670e630f
Content-Type: text/html; name = "myfile.html"
Content-Transfer-Encoding: base64
... (attachment)
So the body of my e-mail sends as html file in mime. But I need to have plain text + attachment. Something like this:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----------B92724835402C49"
------------B92724835402C49
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: 8bit
...Plain text
--b2872505d5695ba62fceb2dd8670e630f
Content-Type: text/html; name = "rub20_order.html"
Content-Transfer-Encoding: base64
... (attachment)
Could someone help me with that?
Leonid