IConverterSession::SetAdrBook

Applies to: Outlook 2013 | Outlook 2016

Specifies an optional MAPI Address Book that the MAPI to MIME converter uses to resolve ambiguous addresses when converting a MAPI message to a MIME stream.

HRESULT IConverterSession::SetAdrBook( 
LPADRBOOK pab); 

Parameters

pab

[in] Pointer to an IAddrBook : IMAPIProp interface to be used in the MAPI to MIME conversion. Set this parameter to null when you no longer need the Address Book; this releases the interface and resets the converter to not using any Address Book.

Return value

S_OK

The function call is successful.

Remarks

Converting a MAPI message to MIME stream generally does not require logging on to a MAPI profile. However, specifying a MAPI Address Book for conversion requires logging on to a profile to obtain the Address Book.

MFCMAPI reference

For MFCMAPI sample code, see the following table.

File Function Comment
MapiMime.cpp
ImportEMLToIMessage
MFCMAPI uses MimeToMAPI to convert an EML file to a MAPI message.
MapiMime.cpp
ExportIMessageToEML
MFCMAPI uses MAPIToMIMEStm to convert a MAPI message to an EML file.

See also

IConverterSession : IUnknown

IConverterSession::MAPIToMIMEStm

IConverterSession::MIMEToMAPI

IConverterSession::SetCharSet

IConverterSession::SetEncoding

IConverterSession::SetSaveFormat

IConverterSession::SetTextWrapping