Retrieves a handle to the message part corresponding to the index.

Syntax

FUNCTION getMessagePartByIndex RETURNS CHARACTER
  (INPUT index AS INTEGER, OUTPUT messagePartH AS HANDLE).

Applies to

Message objects

Notes

  • When you use the same handle variable to retrieve multiple message parts, between retrievals, call deleteMessage procedure on the handle variable to free the message part.
  • The getMessagePartByIndex function returns the content-type of the message. You can use it to identify the message type of the message part.

See also

createMultipartMessage procedure, addBytesPart procedure, addMessagePart procedure, addTextPart procedure, isMessagePart function, getPartCount function, getMessagePartByID function, #rfi1387308611607, writeBytesFromRaw procedure, readBytesToRaw procedure, setMemptr procedure, getMemptr function

For more information, see the MultipartMessage and the MultiPartMessage example.