Share this page

# mapi_get_property_sz

MS Exchange Server Functions (mapi)

Obtains a MAPI session property.

    char* mapi_get_property_sz( char *property );

property | The MAPI property to retrieve. One of the supported MAPI Properties.

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

mapi_get_property_sz allocates storage for the buffer.

This function is for use with global sessions. For multiple sessions, use the mapi_get_property_sz_ex function, which allows you to specify a session identifier.

mapi_get_property_sz is called after mapi_read_next_mail, 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 function retrieves several MAPI session properties.

    char * msgid;
    char * message;

    // Get the Message identifier of current email message.

        msgid = mapi_get_property_sz("Message ID");

    // Get the body of the current email message.

        message = mapi_get_property_sz("Content");

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