Hey All, My apologies in advance if I'm directing this to the wrong location, but I'm about out of ideas. I recently built a small PHP web form to allow individuals to send email updates to our various mailman lists. Everything works quite nicely for non-digest users, but when I tried to configure the script for digest users, things started to get weird. Initially, no matter how many emails I dispatched using the form, the Mailman digest always listed a single topic. In the MIME digest it attached a single message (the first message sent to the list) and in plaintext it appended all the messages sent to the list but still listed as a single message. The headers where all subsequent messages were to start seemed pretty messed up. So I decided to play with the headers a bit and added the line in the php: $headers .= "X-Mailer: PHP/" . phpversion() . "\n"; After that change all digests calculated the number of messages correctly and displayed the headers accurately. Unfortunately, though every thing looks good in digest/plaintext, digest/MIME was acting up. When a MIME digest was received in Outlook, the messages were not attached to the digest. Yet when I sent to a gmail account they appeared below as forwarded messages. Now if I forsake the php form and send MIME email from outlook to the list Outlook correctly creates a multipart/alternative email and the MIME/digest contains appropriate attachments for all messages. Below I list the headers that I'm setting in php, the relevant sections of the plaintext digest with incorrectly counted messages/topics and finally the relevant sections of the plaintext digest with the correct message count. Thanks in advance to anyone who has any thoughts php:
$boundary='--' . md5( uniqid("IsNealAGenius") ); $headers = "From: \"Home Office\" <" . $from. ">\n"; $headers .= "Mime-Version: 1.0\n"; $headers .= "Content-type: multipart/alternative;\n boundary=\"$boundary\"\n X-Mailer: PHP/" . phpversion() . "\n"; $message="\nThis is a multi-part message in MIME format.\n"; $message.="\n\n--$boundary\n"; $message.="Content-Type: text/plain; charset=\"us-ascii\"\n"; $message.="Content-Transfer-Encoding: 8bit\n\n"; $mail_to = "[EMAIL PROTECTED]"; $message .= strip_tags($test); $message .= "\n\n--$boundary\n"; $message .= "Content-Type: text/html; charset=\"us-ascii\"\n"; $message.="Content-Transfer-Encoding: 8bit\n\n"; $message .= $test; mail ($mail_to,"test",$message,$headers); ...................................................................................... plaintext digest 1. Today's Topics: 1. test (Home Office) ---------------------------------------------------------------------- Date: Wed, 21 Sep 2005 10:19:36 -0400 (EDT) From: "Home Office" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Test_list] test Message-ID: [EMAIL PROTECTED] Content-Type: multipart/alternative; boundary="--274280a87c2f32840e53791334dfb49f" MIME-Version: 1.0 Precedence: list Message: 1 This is a multi-part message in MIME format. ----274280a87c2f32840e53791334dfb49f Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit <stripped HTML here.> ----274280a87c2f32840e53791334dfb49f Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 8bit <Real HTML here> ----274280a87c2f32840e53791334dfb49f-- >From [EMAIL PROTECTED] Wed Sep 21 10:19:51 2005 Return-Path: [EMAIL PROTECTED] X-Original-To: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: by mail.here.com <http://mail.here.com> (Postfix, from userid 48) id 0952E52406B; Wed, 21 Sep 2005 10:19:51 -0400 (EDT) To: [EMAIL PROTECTED] From: "Home Office" [EMAIL PROTECTED] Mime-Version: 1.0 Content-type: multipart/alternative; boundary="--921e4b971d970fe077e26dadad939251" Message-Id: [EMAIL PROTECTED] Date: Wed, 21 Sep 2005 10:19:51 -0400 (EDT) Subject: [Test_list] test X-BeenThere: [EMAIL PROTECTED] X-Mailman-Version: 2.1 Precedence: list List-Id: Test list to work out bugs <test_list.here.com> List-Unsubscribe: <*http://www.here.com/mailman/listinfo/test_list*<http://www.here.com/mailman/listinfo/test_list> >, <*mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > List-Archive: </heremail> List-Post: <*mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>> List-Help: <*mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > List-Subscribe: <*http://www.here.com/mailman/listinfo/test_list*<http://www.here.com/mailman/listinfo/test_list> >, <*mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > This is a multi-part message in MIME format. ----921e4b971d970fe077e26dadad939251 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit ..... <Rest of message> ............................................................ plaintext digest #2: Today's Topics: 1. test (Home Office) 2. test (Home Office) 3. test (Home Office) ---------------------------------------------------------------------- Date: Wed, 21 Sep 2005 09:56:42 -0400 (EDT) From: "Home Office" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Test_list] test Message-ID: [EMAIL PROTECTED] Content-Type: multipart/alternative; boundary="--c9dff2da6d2e9942c846b891d664122e" X-Mailer: PHP/4.3.2 MIME-Version: 1.0 Precedence: list Message: 1 This is a multi-part message in MIME format. ----c9dff2da6d2e9942c846b891d664122e Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit <Plain text here> ----d9d51c58d8acd322402f930ba7754354 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 8bit <HTML here> ----01f73f678c4ca55f470d0225d6131bb2 ------------------------------ Date: Wed, 21 Sep 2005 13:28:37 -0400 (EDT) From: "Home Office" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Test_list] test Message-ID: [EMAIL PROTECTED] Content-Type: multipart/alternative; boundary="--7cdc89be99811720df8db7a5ddb7bc0e" X-Mailer: PHP/4.3.2 MIME-Version: 1.0 Precedence: list Message: 2 This is a multi-part message in MIME format. ----7cdc89be99811720df8db7a5ddb7bc0e Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit <rest of message> ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp