Manual Pages for UNIX Darwin command on man mime
MyWebUniversity

Manual Pages for UNIX Darwin command on man mime

mime(n) Mime mime(n)

NAME

mime - Manipulation of MIME body parts

SYNOPSIS

package require TTccll package require mmiimmee ??11..33..66??

::::mmiimmee::::iinniittiiaalliizzee ?-ccaannoonniiccaall type/subtype ?-ppaarraamm {key value}...?

?-eennccooddiinngg value? ?-hheeaaddeerr {key value}...?? (-ffiillee name | -ssttrriinngg value

| -ppaarrtt {token1 ... tokenN})

::::mmiimmee::::ffiinnaalliizzee token ?-ssuubboorrddiinnaatteess aallll | ddyynnaammiicc | nnoonnee?

::::mmiimmee::::ggeettpprrooppeerrttyy token ?property | -nnaammeess?

::::mmiimmee::::ggeetthheeaaddeerr token ?key | -nnaammeess?

::::mmiimmee::::sseetthheeaaddeerr token key value ?-mmooddee wwrriittee | aappppeenndd | ddeelleettee?

::::mmiimmee::::ggeettbbooddyy token ?-ccoommmmaanndd callback ?-bblloocckkssiizzee octets??

::::mmiimmee::::ccooppyymmeessssaaggee token channel ::::mmiimmee::::bbuuiillddmmeessssaaggee token ::::mmiimmee::::ppaarrsseeaaddddrreessss string

::::mmiimmee::::ppaarrsseeddaatteettiimmee (string | -nnooww) property

::::mmiimmee::::mmaappeennccooddiinngg encodingname ::::mmiimmee::::rreevveerrsseemmaappeennccooddiinngg charsettype

DESCRIPTION

The mmiimmee library package provides the commands to create and manipulate MIME body parts.

::::mmiimmee::::iinniittiiaalliizzee ?-ccaannoonniiccaall type/subtype ?-ppaarraamm {key value}...?

?-eennccooddiinngg value? ?-hheeaaddeerr {key value}...?? (-ffiillee name | -ssttrriinngg value

| -ppaarrtt {token1 ... tokenN})

This command creates a MIME part and returns a token represent-

ing it.

+o If the -ccaannoonniiccaall option is present, then the body is in

canonical (raw) form and is found by consulting either

the -ffiillee, -ssttrriinngg, or -ppaarrtt option.

In addition, both the -ppaarraamm and -hheeaaddeerr options may

occur zero or more times to specify CCoonntteenntt-TTyyppee parame-

ters (e.g., cchhaarrsseett) and header keyword/values (e.g.,

CCoonntteenntt-DDiissppoossiittiioonn), respectively.

Also, -eennccooddiinngg, if present, specifies the CCoonntteenntt-TTrraannss-

ffeerr-EEnnccooddiinngg when copying the body.

+o If the -ccaannoonniiccaall option is not present, then the MIME

part contained in either the -ffiillee or the -ssttrriinngg option

is parsed, dynamically generating subordinates as appro-

priate.

::::mmiimmee::::ffiinnaalliizzee token ?-ssuubboorrddiinnaatteess aallll | ddyynnaammiicc | nnoonnee?

This command destroys the MIME part represented by token. It returns an empty string.

If the -ssuubboorrddiinnaatteess option is present, it specifies which sub-

ordinates should also be destroyed. The default value is ddyynnaammiicc, destroying all subordinates which were created by ::::mmiimmee::::iinniittiiaalliizzee together with the containing body part.

::::mmiimmee::::ggeettpprrooppeerrttyy token ?property | -nnaammeess?

This command returns a string or a list of strings containing the properties of a MIME part. If the command is invoked with the name of a specific property, then the corresponding value is

returned; instead, if -nnaammeess is specified, a list of all proper-

ties is returned; otherwise, a serialized array of properties and values is returned. The possible properties are: ccoonntteenntt The type/subtype describing the content eennccooddiinngg

The "Content-Transfer-Encoding"

ppaarraammss A list of "Content-Type" parameters

ppaarrttss A list of tokens for the part's subordinates. This prop-

erty is present only if the MIME part has subordinates. ssiizzee The approximate size of the content (unencoded)

::::mmiimmee::::ggeetthheeaaddeerr token ?key | -nnaammeess?

This command returns the header of a MIME part, as a list of strings. A header consists of zero or more key/value pairs. Each value is a list containing one or more strings. If this command is invoked with the name of a specific key, then a list containing the corresponding value(s) is returned;

instead, if -names is specified, a list of all keys is returned;

otherwise, a serialized array of keys and values is returned. Note that when a key is specified (e.g., "Subject"), the list returned usually contains exactly one string; however, some keys (e.g., "Received") often occur more than once in the header, accordingly the list returned usually contains more than one string.

::::mmiimmee::::sseetthheeaaddeerr token key value ?-mmooddee wwrriittee | aappppeenndd | ddeelleettee?

This command writes, appends to, or deletes the value associated

with a key in the header. It returns a list of strings contain-

ing the previous value associated with the key.

The value for -mmooddee is one of:

wwrriittee The key/value is either created or overwritten (the default).

aappppeenndd A new value is appended for the key (creating it as nec-

essary). ddeelleettee All values associated with the key are removed (the value parameter is ignored).

::::mmiimmee::::ggeettbbooddyy token ?-ccoommmmaanndd callback ?-bblloocckkssiizzee octets??

This command returns a string containing the body of the leaf MIME part represented by token in canonical form.

If the -ccoommmmaanndd option is present, then it is repeatedly invoked

with a fragment of the body as this:

uplevel #0 $callback [list "data" $fragment]

(The -bblloocckkssiizzee option, if present, specifies the maximum size

of each fragment passed to the callback.) When the end of the body is reached, the callback is invoked as:

uplevel #0 $callback "end"

Alternatively, if an error occurs, the callback is invoked as:

uplevel #0 $callback [list "error" reason]

Regardless, the return value of the final invocation of the callback is propagated upwards by ::::mmiimmee::::ggeettbbooddyy.

If the -ccoommmmaanndd option is absent, then the return value of

::::mmiimmee::::ggeettbbooddyy is a string containing the MIME part's entire body. ::::mmiimmee::::ccooppyymmeessssaaggee token channel This command copies the MIME represented by token part to the specified channel. The command operates synchronously, and uses

fileevent to allow asynchronous operations to proceed indepen-

dently. It returns an empty string. ::::mmiimmee::::bbuuiillddmmeessssaaggee token This command returns the MIME part represented by token as a string. It is similar to ::::mmiimmee::::ccooppyymmeessssaaggee, only it returns the data as a return string instead of writing to a channel. ::::mmiimmee::::ppaarrsseeaaddddrreessss string

This command takes a string containing one or more 822-style

address specifications and returns a list of serialized arrays, one element for each address specified in the argument. If the string contains more than one address they will be separated by commas. Each serialized array contains the properties below. Note that one or more of these properties may be empty. aaddddrreessss local@domain ccoommmmeenntt

822-style comment

ddoommaaiinn the domain part (rhs)

eerrrroorr non-empty on a parse error

ggrroouupp this address begins a group ffrriieennddllyy

user-friendly rendering

llooccaall the local part (lhs) mmeemmbbeerrPP this address belongs to a group pphhrraassee the phrase part

pprrooppeerr 822-style address specification

rroouuttee 822-style route specification (obsolete)

::::mmiimmee::::ppaarrsseeddaatteettiimmee (string | -nnooww) property

This command takes a string containing an 822-style date-time

specification and returns the specified property as a serialized array. The list of properties and their ranges are: hhoouurr 0 .. 23 llmmoonntthh January, February, ..., December llwweeeekkddaayy Sunday, Monday, ... Saturday mmddaayy 1 .. 31 mmiinn 0 .. 59 mmoonn 1 .. 12 mmoonntthh Jan, Feb, ..., Dec

pprrooppeerr 822-style date-time specification

rrcclloocckk elapsed seconds between then and now sseecc 0 .. 59 wwddaayy 0 .. 6 (Sun .. Mon) wweeeekkddaayy Sun, Mon, ..., Sat yyddaayy 1 .. 366 yyeeaarr 1900 ...

zzoonnee -720 .. 720 (minutes east of GMT)

::::mmiimmee::::mmaappeennccooddiinngg encodingname This commansd maps tcl encodings onto the proper names for their MIME charset type. This is only done for encodings whose charset types were known. The remaining encodings return "" for now. ::::mmiimmee::::rreevveerrsseemmaappeennccooddiinngg charsettype This command maps MIME charset types onto tcl encoding names. Those that are unknown return "".

KNOWN BUGS

SourceForge Tcllib Bug #447037

This problem affects only people which are using Tcl and Mime on

a 64-bit system. The currently recommended fix for this problem

is to upgrade to Tcl version 8.4. This version has extended 64 bit support and the bug does not appear anymore. The problem could have been generally solved by requiring the

use of Tcl 8.4 for this package. We decided against this solu-

tion as it would force a large number of unaffected users to upgrade their Tcl interpreter for no reason.

See http://source-

forge.net/tracker/?func=detail&aid=447037&groupid=12883&atid=112883 for additional information.

SEE ALSO

ftp, http, pop3, smtp KKEEYYWWOORRDDSS

email, internet, mail, mime, net, rfc 821, rfc 822, smtp

COPYRIGHT

Copyright (c) 1999-2000 Marshall T. Rose

mime 1.3.6 mime(n)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™