Share this page

# mapi_get_property_sz_ex

MS Exchange Server Functions (mapi)

Obtains a MAPI property for a specific session.

    char *mapi_get_property_sz_ex( MAPI *ppmapi, char *property );

ppmapi | A session identifier.
property | The MAPI property to retrieve. One of the supported MAPI Properties.

The mapi_get_property_sz_ex function retrieves the value of the requested MAPI property for the current message in a specific session and returns a pointer to the buffer containing the value.

mapi_get_property_sz_ex allocates storage for the buffer.

This function is for use with multiple sessions. For global sessions, use the mapi_get_property_sz function, which leaves out the session identifier.

mapi_get_property_sz_ex is called after mapi_read_next_mail_ex which saves the body of the current message to the Content property using the "Save=body" option.

## Return Values

If this function succeeds, it returns the value of the specified property. Otherwise, it returns an empty string.

## Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.

## Example

In the following example, the mapi_get_property_sz_ex function retrieves several MAPI session properties.

Copy code

    char * msgid;
    char * message;
    // Get the Message identifier of current email message.
        msgid = mapi_get_property_sz_ex(&mapi,"Message ID");
    // Get the body of the current email message.
        message = mapi_get_property_sz_ex(&mapi,"Content");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: