WRITEATTACH

NAME

WriteAttach -- Attach a file to a new message.

TEMPLATE

FILE/A,DESC,ENCMODE,CTYPE

FUNCTION

Attaches a file to a new message.

INPUTS

FILE/A - filename to attach, with pathDESC - optional, string with a description for the file (V1.3)ENCMODE - optional, encoding type for the file; may be either "uu" or "b64" (V1.3)CTYPE - optional, content type of the file (V1.3)

RETURNS

RC is set to 10 if no Write window was previously specified as
"active" with MAILWRITE.

The default content type is taken after scanning the built-in
list of MIME types and then looking at the MIME types defined
in the user configuration. For instance, if the user has
defined "application/pgs" as MIME type for files using the
".pgs" extension, all files attached bearing this extension
will default to "application/pgs" unless CTYPE overrides this.
If no suitable MIME type is found and no content type has been
specified, YAM will fallback to "application/octet-stream".