From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 36A14BCAF for ; Tue, 14 Jun 2005 15:55:31 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5EDtU5W001317 for ; Tue, 14 Jun 2005 15:55:30 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA07626 for ; Tue, 14 Jun 2005 15:55:30 +0200 (MET DST) Received: from mail2.sun.ac.za (mail2.sun.ac.za [146.232.64.14]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5EDtTCu018777 for ; Tue, 14 Jun 2005 15:55:30 +0200 Received: from burger.sun.ac.za ([146.232.128.30]) by mail2.sun.ac.za with esmtp (Exim 4.34) id 1DiBt2-00043F-7V for caml-list@inria.fr; Tue, 14 Jun 2005 15:55:28 +0200 Received: from js by burger.sun.ac.za with local id 1DiBt2-00045t-5U for ; Tue, 14 Jun 2005 15:55:28 +0200 Date: Tue, 14 Jun 2005 15:55:28 +0200 From: Johann Spies To: caml-list@inria.fr Message-Id: <20050614135528.GB14644@sun.ac.za> Subject: Netmime: parsing a nested multipart message Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Disclaimer: added Mail-Followup-To: Johann Spies , caml-list@inria.fr X-Miltered: at nez-perce with ID 42AEE1D2.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42AEE1D1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; spies:01 jspies:01 parsing:01 nesting:01 spies:01 universiteit:01 stellenbosch:01 ...:98 021:98 ...:98 recursively:01 johann:01 johann:01 telefoon:02 4036:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: I have to add a disclaimer on server level to emails. In order to do that I want to add the disclaimer to the first "`Body " of a message. At the moment I have success with messages with the following stuctures: Netmime.complex_mime_message = (, `Body ) and (, `Parts [(, `Body ); (, `Body );...]) but I am struggling with the following one: - : Netmime.complex_mime_message = (, `Parts [(, `Parts [(, `Body ); (, `Body )]); (, `Body ); (, `Body ); (, `Body )]) I cannot predict how deep the nesting would be and so far was unsuccessful in my effort to parse the tree recursively to get the first `Body ) I would appreciate some help please. Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "I beseech you therefore, brethren, by the mercies of God, that ye present your bodies a living sacrifice, holy, acceptable unto God, which is your reasonable service." Romans 12:1 VRYWARING: Hierdie vrywaring is bloot 'n toets... DISCLAIMER: This disclaimer was just added as a test...