Platform SDK: Exchange 2000 Server

Message Streams

[This is preliminary documentation and subject to change.]

The serialized message stream is formatted according to RFC 822 using MIME or UUENCODE where required and it is retrieved using the IMessage.GetStream method. Both returned Stream object are adTypeText type character stream and contain only US-ASCII characters.

The following code example, illustrates the MIME stream for a message having HTML, plain text message, and an attached XSL style sheet:

Thread-Topic: This is a test
From: "Another" <another@microsoft.com>
To: "Some One" <someone@microsoft.com>
Subject: This is a test
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_0000_01BED78B.61E13E10"
Thread-Index: Ab7Xxg4EDFQD/RrtQVCb0K8odOtcJA
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2918.2701

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01BED78B.61E13E10
Content-Type: multipart/alternative;
        boundary="----=_NextPart_001_0001_01BED78B.61E13E10"


------=_NextPart_001_0001_01BED78B.61E13E10
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here is a simple message.

------=_NextPart_001_0001_01BED78B.61E13E10
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

<html><p>Here is a simple <b>message</b>.
------=_NextPart_001_0001_01BED78B.61E13E10--

------=_NextPart_000_0000_01BED78B.61E13E10
Content-Type: text/xml;
        name="test.xsl"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="test.xsl"

<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/TR/WD-xsl">
<xsl:template>
  <xsl:copy>
      <xsl:apply-templates select=3D"@*"/>
      <xsl:apply-templates select=3D"* | text()"/>
  </xsl:copy></xsl:template><xsl:template =
match=3D"@*"><xsl:copy><xsl:value-of/></xsl:copy></xsl:template>
</xsl:stylesheet>
------=_NextPart_000_0000_01BED78B.61E13E10--

This previous example was generated using CDO for Exchange using the IMessage.GetStream method.

Note   For a Message object, the IMessage.GetStream and the IBodyPart.GetStream methods return identical streams. Specifically, the stream that is returned by calling IBodyPart.GetStream on a Message object is the same as if it were retrieved using the IMessage.GetStream method.

See Also

IMessage.GetStream Method

IBodyPart.GetStream Method