HELPLIB.HLB  —  MAIL Routines, MAIL$SEND_ADD_BODYPART
    Builds the body of a message.

    Format

      MAIL$SEND_ADD_BODYPART  context ,in_item_list ,out_item_list

1  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

    Longword condition value. All utility routines return a condition
    value in R0. Condition values that can be returned by this
    routine are listed under Condition Values Returned.

2  –  Arguments

 context

    OpenVMS usage:context
    type:         longword (unsigned)
    access:       modify
    mechanism:    by reference
    Send context information to be passed to send routines. The
    context argument is the address of a longword that contains send
    context information returned by MAIL$SEND_BEGIN.

 in_item_list

    OpenVMS usage:itmlst_3
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Item list specifying options for the routine. The in_item_list
    argument is the address of a list of item descriptors, each of
    which specifies an option and provides the information needed to
    perform the operation.

    The item list is terminated by longword value of 0.

    See MAIL$SEND_BEGIN for a description of an input item
    descriptor.

3  –  Input Item Codes

 MAIL$_SEND_DEFAULT_NAME

    MAIL$_SEND_DEFAULT_NAME specifies the default file specification
    of a text file to be opened. The buffer address field of the item
    descriptor points to a buffer that contains a character string 0
    to 255 characters long.

    Specify a value from 0 to 255 in the buffer length field of the
    item descriptor.

 MAIL$_SEND_FID

    MAIL$_SEND_FID specifies the file identifier of the text file
    to be opened. The buffer address field of the item descriptor
    points to a buffer that contains the file identifier. To identify
    a file using a file identifier, you must also specify the device
    identifier for the file. Specify the device identifier using the
    MAIL$_SEND_DEFAULT_NAME item code. More information about using
    a file ID for specifying files can be found in OpenVMS Record
    Management Services Reference Manual. Note that the MAIL$_SEND_
    FID item code and the MAIL$_SEND_FILENAME item code are mutually
    exclusive.

 MAIL$_SEND_FILENAME

    MAIL$_SEND_FILENAME specifies the input file specification of
    the text file to be opened. The buffer address field of the item
    descriptor points to a buffer that receives a character string
    0 to 255 characters long. Note that the MAIL$_SEND_FILENAME item
    code and the MAIL$_SEND_FID item code are mutually exclusive.

    Specify a value from 0 to 255 in the buffer length field of the
    item descriptor.

 MAIL$_SEND_RECORD

    MAIL$_SEND_RECORD specifies a descriptor of a text record to be
    added to the body of the message. The buffer address field of
    the item descriptor points to a buffer that receives a character
    string 0 to 998 characters long.

    Specify a value from 0 to 998 in the buffer length field of the
    item descriptor.

    When creating a message, do not specify MAIL$_SEND_RECORD in the
    same call (or series of calls) to MAIL$SEND_ADD_BODYPART with the
    following item codes:

    o  MAIL$_SEND_FID

    o  MAIL$_SEND_FILENAME

                                   NOTE

       Do not use the MAIL$_SEND_RECORD item code with the
       MAIL$SEND_ADD_BODYPART routine called from a detached
       process. The routine creates a temporary file in SYS$SCRATCH
       that is inaccessible to the detached process.

 out_item_list

    OpenVMS usage:itmlst_3
    type:         longword
    access:       write only
    mechanism:    by reference
    Item list specifying the information you want the routine to
    return. The out_item_list argument is the address of a list of
    item descriptors, each of which describes an item of information.
    The list of item descriptors is terminated by longword value of
    0.

4  –  Output Item Code

 MAIL$_SEND_RESULTSPEC

    When you specify MAIL$_SEND_RESULTSPEC, MAIL$SEND_ADD_BODYPART
    returns the resultant file specification identified with MAIL$_
    SEND_FILENAME. The buffer address field of the item descriptor
    points to a buffer that receives a character string 0 to 255
    characters long.

    Specify a value from 0 to 255 in the buffer length field of the
    item descriptor.

5  –  Description

    You can use MAIL$SEND_ADD_BODYPART to specify a file that
    contains the entire message or to add a single record to a
    message. If the message is contained in a file, you call
    MAIL$SEND_ADD_BODYPART once, specifying the file name. If
    you want to add to the message record-by-record, you can call
    MAIL$SEND_ADD_BODYPART repeatedly, specifying a different record
    each time until you complete the message.

    You cannot specify both a file name and a record for the same
    message. You can specify either MAIL$_SEND_FILENAME or MAIL$_
    SEND_FID once, or you can specify MAIL$_SEND_RECORD one or more
    times.

6  –  Condition Values Returned

    SS$_NORMAL         Normal successful completion.
    MAIL$_CONITMCOD    The specified item codes define conflicting
                       operations.
    MAIL$_INVITMCOD    The specified item code is invalid.
    MAIL$_INVITMLEN    The specified item length is invalid.
    MAIL$_MISREQITEM   The required item is missing.
    MAIL$_OPENIN       The required file is missing.
    SS$_ACCVIO         Access violation.
Close Help