MS Exchange Server Functions (MAPI) > Alphabetical List of Functions > mapi_get_property_sz


Example: 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.


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