Accessing parts of a message with IMAP
William Wyatt <wwyatt@bostech.com> Fri, 29 August 1997 16:27 UTC
Received: from cnri by ietf.org id aa10371; 29 Aug 97 12:27 EDT
Received: from lists2.u.washington.edu (root@lists2.u.washington.edu [140.142.56.1]) by cnri.reston.va.us (8.8.5/8.7.3) with ESMTPid MAA17145 for <ietf-archive@CNRI.Reston.VA.US>; Fri, 29 Aug 1997 12:30:55 -0400 (EDT)
Received: from host (lists.u.washington.edu [140.142.56.13]) by lists2.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.05) with SMTP id JAA29490; Fri, 29 Aug 1997 09:22:05 -0700
Received: from mx4.u.washington.edu (mx4.u.washington.edu [140.142.33.5]) by lists.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.05) with ESMTP id JAA38364 for <imap@lists.u.washington.edu>; Fri, 29 Aug 1997 09:21:16 -0700
Received: from not.bostech.com (not.bostech.com [205.139.12.10]) by mx4.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.04) with SMTP id JAA00382 for <imap@u.washington.edu>; Fri, 29 Aug 1997 09:21:08 -0700
Received: from carrier.btrd.bostontechnology.com by not.bostech.com (SMI-8.6/SMI-SVR4) id MAA17953; Fri, 29 Aug 1997 12:18:52 -0400
Received: by carrier.btrd.bostontechnology.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63) id <01BCB475.A003ACE0@carrier.btrd.bostontechnology.com>; Fri, 29 Aug 1997 12:18:14 -0400
Message-Id: <c=US%a=_%p=bostech%l=CARRIER-970829161811Z-3333@carrier.btrd.bostontechnology.com>
Date: Fri, 29 Aug 1997 12:18:11 -0400
Sender: IMAP-owner@u.washington.edu
Precedence: bulk
From: William Wyatt <wwyatt@bostech.com>
To: "'imap@u.washington.edu'" <imap@u.washington.edu>
Subject: Accessing parts of a message with IMAP
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Listprocessor-Version: 8.1 beta -- ListProcessor(tm) by CREN
I have a question regarding how to access various parts of a message with IMAP. The easiest way to pose the question is with an example. Below is an example message followed by some FETCH commands and what I expect to get back from each one. I would appreciate any and all feedback regarding the validity (or invalidity) of my interpretation of the FETCH command. Thanks, William J. Wyatt Boston Technology, Inc. wwyatt@bostech.com 508 738 3147 Here is the example message followed by my FETCH commands. From: wwyatt@bostech.com To: wwyatt@bostech.com Date: 08/29/97 09:43:23 Subject: An IMAP test. MIME-Version: 1.0 Content-type: multipart/mixed; boundary=unique-boundary-1 <blank line> --unique-boundary-1 Content-type: audio/x-bti-oki24 <blank line> ... here is the data ... <blank line> --unique-boundary-1 Content-type: message/external-body; access-type=cifs; name="<file name>"; size=12510 <blank line> Content-type: audio/x-bti-oki24 Content-ID: <some id> <blank line> <blank line> --unique-boundary-1 Ok. I want to fetch various parts of body part 1 (aka MIME entity 1). This is what I expect given my interpretation of the description of the FETCH command in RFC 2060: (assume this is message 1) FETCH 1 BODY[HEADER] gives me: From: wwyatt@bostech.com To: wwyatt@bostech.com Date: 08/29/97 09:43:23 Subject: An IMAP test. MIME-Version: 1.0 Content-type: multipart/mixed; boundary=unique-boundary-1 FETCH 1 BODY[TEXT] gives me: --unique-boundary-1 Content-type: audio/x-bti-oki24 <blank line> ... here is the data ... <blank line> --unique-boundary-1 Content-type: message/external-body; access-type=cifs; name="<file name>"; size=12510 <blank line> Content-type: audio/x-bti-oki24 Content-ID: <some id> <blank line> <blank line> --unique-boundary-1 FETCH 1 BODY[1] gives me: Content-type: audio/x-bti-oki24 <blank line> ... here is the data ... FETCH 1 BODY[1.MIME] gives me: Content-type: audio/x-bti-oki24 FETCH 1 BODY[2] gives me: Content-type: message/external-body; access-type=cifs; name="<file name>"; size=12510 <blank line> Content-type: audio/x-bti-oki24 Content-ID: <some id> <blank line> <blank line> FETCH 1 BODY[2.MIME] gives me: Content-type: message/external-body; access-type=cifs; name="<file name>"; size=12510 FETCH 1 BODY[2.HEADER] gives me: Content-type: audio/x-bti-oki24 Content-ID: <some id> and, FETCH 1 BODY[2.TEXT] returns nothing (or an error?) since the 'text' for this is external. I would also assume that if this MIME entity had a content-type of message/rfc822 instead of message/external-body that FETCH 1 BODY[2.TEXT] would return me the text/data portion of the encapsulated rfc822 message.
- Accessing parts of a message with IMAP William Wyatt
- re: Accessing parts of a message with IMAP Mark Crispin