FunctionPackage: net.post-officeToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

make-mime-part

Arguments: &key content-type encoding external-format headers attachmentp name text start end file subparts id description parameters charset

This function returns a mime-part-constructed object with properties as specified by the arguments. There are many examples using this function in MIME support in imap.htm.

Like many Lisp constructor functions, make-mime-part offers a lot of options and looks complicated but typically only a few of the many keyword arguments are actually necessary. make-mime-part supplies many defaults that are sufficient for the most common scenarios.

MIME parts have contents. The contents can be supplied in one of three ways: with the text argument, with the file argument, or with the subparts argument:

  1. Using the text keyword argument: the text keyword argument specifies a string that will be used as the body of the new part. If one or both of the start and end keyword arguments are supplied, then the desired subsequence of the string will be used. The default content-type is "text/plain" when text is a string. See also the description of the external-format keyword argument.

    The text keyword argument can also be an (unsigned-byte 8) array. The subsequence of the array bounded by the start and end keyword arguments (specified) will be used. The default content-type is "application/octet-stream" when text is an (unsigned-byte 8) array.

  2. Using the file keyword argument: the file keyword argument specifies a filename or an input stream that will be used to populate the body of new part. Note that the file/stream is not read until the part is rendered. If the argument is an input stream, it must be a stream that is capable of being read in an octet-oriented manner (e.g., it cannot be a string-input-stream). The default content-type will be deduced based on the specified filename or the filename associated with the input stream (if possible). If no specific content-type can be deduced, "application/octet-stream" will be used as the default. See also the description of the external-format keyword argument.
  3. Using the subparts keyword argument: this only applies to multipart parts. The contents of a multipart part are simply other parts. The subparts argument should be a list of parts (as constructed by make-mime-part). The default content-type when subparts is specified is "multipart/mixed".

The start and end keyword arguments can be used to specify a subsequence of a text string to use. See the description of the text argument just above.

The remaining keyword arguments allow you to augment and override default settings for the new part:

See MIME support in imap.htm for more information. That section contains examples.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version