Platform SDK: CDO for Windows 2000 |
The serialized message stream, formatted using Multipurpose Internet Mail Extensions (MIME) or Uuencode, is retrieved using the IMessage.GetStream method. In both cases, the Stream object that is returned is of type adTypeText (character stream).
For example, the MIME stream for a message having both Hypertext Markup Language (HTML) and plain text and an attached Extensible Markup Language (XSL) style sheet can look like the following:
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 example was generated using Microsoft Collaboration Data Objects (CDO) for Microsoft® Windows® 2000 using the IMessage.GetStream method.)
Note For a Message object, the IMessage.GetStream and the IBodyPart.GetStream methods return identical streams; that is, the stream returned by calling the IBodyPart.GetStream method on a Message object is the same as the stream returned by calling the IMessage.GetStream method.