Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23624 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45867 invoked by uid 1010); 23 May 2006 10:20:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 45852 invoked from network); 23 May 2006 10:20:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2006 10:20:06 -0000 X-PHP-List-Original-Sender: lists@block-online.eu X-Host-Fingerprint: 81.169.145.161 natfrord.rzone.de Solaris 8 (1) Received: from ([81.169.145.161:52353] helo=natfrord.rzone.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 81/88-19568-5D1E2744 for ; Tue, 23 May 2006 06:20:05 -0400 Received: from ollie.block-gmbh.de (dslb-084-063-167-152.pools.arcor-ip.net [84.63.167.152]) (authenticated bits=0) by post.webmailer.de (8.13.6/8.13.6) with ESMTP id k4NAK0AE005792 for ; Tue, 23 May 2006 12:20:01 +0200 (MEST) To: internals@lists.php.net Date: Tue, 23 May 2006 12:19:33 +0200 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Disposition: inline Message-ID: <200605231219.33850.lists@block-online.eu> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: imap_mail_compose() vs. imap_mail() From: lists@block-online.eu (Oliver Block) Hello, I'd like to report another imap problem. (I've decided not to report this as a bug, because I don't believe it is one. I guess it is just not elaborated): If you create a multipart/mixed message using imap_mail_compose, you have to provide for a multipart Content-Type header in the following way (taken from the manual): $multipart["type"] = TYPEMULTIPART; $multipart["subtype"] = "mixed"; $body[] = $multipart; ... Now you can add more body parts to the body. The result will be: MIME-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY="-559023410-851401618-1148335575=:28970" ---559023410-851401618-1148335575=:28970 [... Rest of the message ...] If you ommit it (it is the multipart stuff above) and instead add happily parts to the body, the function will neither create boundaries, nor a multipart/mixed message. It will only create one body part -- The first one. OK so far. If you use imap_mail() to send a message you are required to supply at least three string parameters: To, Subject, Message And you may send additional header fields "and a little more". When the message is send using imap_mail() and we supply the multipart/mixed message. (from above) we would supply it as Message argument to imap_mail(). No the problem: There will be a blank line between the header fields (To, Subject, addtional Headers) and the value of the string holding the message. The blank line indicates the begin of the body. That means, our MIME-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY="-559023410-851401618-1148335575=:28970" will never become part of the message header but of the message body. Best Regards, Oliver P.S. Just in case: If I am misunderstanding the subject of this mailing list, please tell me.