Partager via


IConverterSession::MAPIToMIMEStm

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Converts a MAPI message to a MIME stream.

HRESULT IConverterSession::MAPIToMIMEStm( 
    LPMESSAGE pmsg, 
    LPSTREAM pstm, 
    ULONG ulFlags 
);

Parameters

  • pmsg
    [in] Pointer to the message to convert. See mapidefs.h for the type definition of LPMESSAGE.

  • pstm
    [out] IStream interface to output the stream.

  • ulFlags
    [in] Flags that indicate specific actions for the converter:

    • CCSF_8BITHEADERS
      The converter should allow 8-bit headers.

    • CCSF_EMBEDDED_MESSAGE
      Sent/unsent information is persisted in X-Unsent.

    • CCSF_INCLUDE_BCC
      BCC recipients of the MAPI message should be included in the MIME stream.

    • CCSF_NO_MSGID
      Do not include Message-Id field in outgoing messages.

    • CCSF_NOHEADERS
      The converter should ignore the headers of the outside message.

    • CCSF_PLAIN_TEXT_ONLY
      The converter should just send plain text.

    • CCSF_SMTP
      The converter is being passed an SMTP message. This flag must always be set.

    • CCSF_USE_RTF
      The converter should convert from HTML to RTF format in the MIME message.

    • CCSF_USE_TNEF
      The converter should use Transport Neutral Encapsulation Format (TNEF) format in the MIME message.

Return Values

  • E_INVALIDARG
    Invalid flags were passed, or pmsg or pstm is NULL.

Remarks

Supported only for standard Outlook message types.

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

Reference

IConverterSession : IUnknown

IConverterSession::MAPIToMIMEStm

IConverterSession::MIMEToMAPI

IConverterSession::SetAdrBook

IConverterSession::SetCharSet

IConverterSession::SetEncoding

IConverterSession::SetSaveFormat

IConverterSession::SetTextWrapping

PidTagMessageEditorFormat Canonical Property

PidLidUseTnef Canonical Property

Concepts

MAPI Constants