PHP General
Subject: IMAP + Multiple Attachment
Author: Hussain (210.56.12.50)
Date: 29/08/2002 08:32
Hi ,
I'm working on the IMAP. I want to send multiple attachments in a mail .How can i do that ? I'm sending a single attachment in a mail through the code given below
"
// create a MIME boundary string
$boundary = "=====N2NMAIL." . md5(uniqid(time())) . "=====";
// add MIME data to the message headers
$headers .= "MIME-Version:1.0\r\n";
$headers .= "Content-Type: multipart/mixed; \r\n\tboundary=\"$boundary\"\r\n\r\n";
// start building a MIME message
// first part is always the message body
// encode as 7-bit text
$str = "--" . $boundary . "\r\n";
$str .= "Content-Type: text/plain;\r\n\tcharset=\"us-ascii\"\r\n";
$str .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
$str .= "$draft_body\r\n\r\n";
"
In the last line I'm sending the attachment with message . How can i use that code with the multiple attachments ?? How can i put the information in the header that such number of attachments r there in the mail.
Thanks in advance.
Mush