Published: July 16, 2012
Converts a MAPI message to a MIME stream.
HRESULT IConverterSession::MAPIToMIMEStm( LPMESSAGE pmsg, LPSTREAM pstm, ULONG ulFlags );
[in] Pointer to the message to convert. See mapidefs.h for the type definition of LPMESSAGE.
[out] IStream interface to output the stream.
[in] Flags that indicate specific actions for the converter:
The converter should allow 8-bit headers.
Sent/unsent information is persisted in X-Unsent.
BCC recipients of the MAPI message should be included in the MIME stream.
Do not include Message-Id field in outgoing messages.
The converter should ignore the headers of the outside message.
The converter should just send plain text.
The converter is being passed an SMTP message. This flag must always be set.
The converter should convert from HTML to RTF format in the MIME message.
The converter should use Transport Neutral Encapsulation Format (TNEF) format in the MIME message.
Invalid flags were passed, or pmsg or pstm is NULL.
Supported only for standard Outlook message types.
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.
ExportIMessageToEML
MFCMAPI uses MAPIToMIMEStm to convert a MAPI message to an EML file.