Bodypart entities

$body children
Returns a list of bodyparts contained in this bodypart. This only makes sense for multipart entities.
$body message
Extracts a message from this bodypart and returns the message handler. This can only be done on message entities. If the message is empty an empty string is returned.
$body dsn
Extracts the DSN data from a message/delivery-status body part. The data is returned as:
	{msg-fields} {{recipient1-fields} {recipient2-fields}}
    
Where there can be an arbitrary number of recipient fields. Each item is actually a list of lists. Each sublist contains a key and a value.
$body type
Returns a list containing the type and subtype of the bodypart.
$body params
Returns a list of the parameters set for this bodypart. The list is a list of lists where each sublist contains two elements. The parameter name and its value.
$body parameter name
Returns the value of the parameter specified by "name". If the parameter is unavailable an empty string is returned.
$body id
Returns the bodypart ID if available. Otherwise an empty string is returned.
$body description
Returns the bodypart description if available. Otherwise an empty string is returned.
$body size
Returns the size of the bodypart in bytes.
$body lines
Returns the size of the bodypart in lines.
$body encoding
Returns the encoding the body is in.
$body isGoodCharset Returns true if this body is encoded in a charset we know how to handle.
$body data encoded charset
Returns a string which contains the body content. If encoded is false any contet-transfer-encoding will be undone. The optional charset parameter tells which charset we should assume the body is encoded in, if no charset is given the body parameters are used.
$body saveData fileId encoded convertNL
Saves the body data in the already opened file. The file must be opened for writing. If encoded is true the data is saved in the form it is in the mailbox. If encoded is false any transport encoding is undone. The convertNL argument controls if the lineends are converted to simple '\n'.
$body findShowCommand
This checks if there is an entry in the mailcaps that matches this bodypart. The return value is a list. If there was no matching element then every entry in the list is empty. The list is {cmd term copious desc bitmap}. And the entries are:
cmdThe command to use to show this body (possibly with '%s')
termA '1' if this program needs a terminal
copiousA '1' if this program gives lots of output
descA description of this type
bitmapThe name of an xbm-file which contains an icon for this type
$body filename
Asks the body if it has a good candidate for a filename for the user who wishes to save this bodypart.
$body encoded
Returns 1 if the bodypart has been decoded. Zero otherwise.
$body sigstatus
Gets the signature status for this bodypart. Possible return values are "pgp_none", "pgp_unchecked", "pgp_good" or "pgp_bad"
$body checksig
Causes this bodypart to check the signature. The return value is the output from pgp.
$body getPGPOutput
Returns the output of the PGP operation performed on this bodypart.