Collaboration Data Objects (CDO)
|
CDO.Message Implements IMessage, IBodyPart, & IDataSource. This class
library provides a set of properties and methods
necessary to create and send SMTP (email) messages and NNTP (newsgroup) postings. This class provides a complete implemention
of the RFC-822 standard as an unmanaged COM object.
- .AddAttachment(URL As String [, UserName As
String][,Password As String])
-
[IBodyPart] (RO) Function to add the specified
file attachment to this message and returns a reference to the new
IBodyPart interface. Supported URL types are file://, ftp://, http://,
and https://
- .AddRelatedBodyPart (URL as String, Reference
As String, ReferenceType As CdoReferenceType[, UserName As
String]{, Password As String])
- [IBodyPart] (RO)] Function to add a body part
related to MIME encapsulation of aggregate HTML documents (MHTML) part
to the message's content and return a reference to it..
- .Attachments
- [IBodyparts] (RO) A reference to the collection
of message attachments.
- .AutoGenerateTextBody
- [Boolean] (RW) Indicates whether the textbody
of a message should be automatically generated from the contents of
HtmlBody propery for a multipart/alternative message.
- .BCC
- [String] (RW) The blind carbon copy recipients
for this message.
- .Bodypart
- [IBodyPart] (RO) Returns a reference to the
IBodyPart interface on this object.
- .CC
- [String] (RW) The carbon copy recipients for
this message.
- .Configuration
- [IConfiguration] (RW) A reference to bind the
configuration object associated with this object.
- .CreateMHTMLBody(URL As String[, Flags As
CdoMHTMLFlags] [, Username As String][, Password As String])
- (WO) Subroutine to convert the contents of an
entire web page into body parts formatted in MHTML on this message.
Final flag value is determined by summing the individual choices and
setting the value to that.
- .DataSource
- [IDataSource] (RO) object.A reference to the
IDataSource interface on this object.
- .DSNOptions
- [cdoDSNOptions] (RW) Includes a request for a
return report on the delivery status of the message.
- .EnvelopeFields
- [ADODB.Fields] (RO) The Simplified Mail
Transport Protocol (SMTP) or Network News Transport Protocol (NNTP)
transport fields of this message. Only available with messages passed to
the transport event sinks.
-
- Can reference any field in the following two
collections:
- CdoSMTPEnvelope
- CdoNNTPEnvelope
- .Fields
- [ADODB.Fields] (RO) Returns a reference to the
'Fields' collection for this object.
-
- Can reference any field in the following five collections:
- CdoMailheader
- CdoHTTPMail
- CdoExchange
- CdoSMTPEnvelope
- CdoNNTPEnvelope
- .FollowUpTo
- [String][ (RW) Identifies newsgroups to which
any responses to this message are posted.
- .Forward
-
[IMessage] (WO) Function to create and return a
reference to a new message that can be used to forward this message.
- .From
- [String] (RW) The messaging address of the
principal author of this message.
- .GetInterface(Interface As String)
-
[Object] (WO) Function that returns a reference
to the specified dual interface on the object. See also
CdoInterfaces.
- .GetStream
- Function that returns the Stream object
containing the complete message, including headers and all content, in
serialized (wire-transport) format.
- .HTMLBody
- [String] (RW) The html representation of this message.
- .HTMLBodyPart
- [IBodypart] (RO) A reference to the IBodyPart
object in which the HTML content of this message is stored.
- .Keywords
- [String] (RW) The list of keywords for this message.
- .MDNRequested
- [Boolean] (RW) Indicates whether a Message
Disposition Notification (MDN) is requested on this message.
- .MIMEFormatted
- [Boolean] (RW) Indicates whether this message
is to be formatted as multipart/alternative.
- .Newsgroups
- [String] (RW) The newsgroup recipients for this message.
- .Organization
- [String] (RW) The NNTP organization of the sender.
- .Post
-
(WO) Subroutine that submits this message to
the specified newsgroups. Equivalent to .Send method.
- .PostReply
-
[IMessage] (WO) Function to create and return a
reference to another message that can be used to post a reply to this
message.
- .ReceivedTime
- [DateTime] (RO) The date and time the message
was received.
- .Reply
-
[IMessage] (WO) Function to create and return a
reference to another message that can be used to reply to sender of this
message.
- .ReplyAll
-
[IMessage] (WO) Function to create and return a
reference to another message that can be used to reply to sender and all
recipients of this message.
- .ReplyTo
- [String] (RW) The messaging address to which
replies to this message should be sent.
- .Send
-
(WO) Subroutine that sends the message.
Equivalent to .Post method.
- .Sender
- [String] (RW) The messaging address of the
message submitter.
- .SentOn
- [DateTime] (RO) The date and time the message
was sent.
- .Subject
- [String] (RW) The message subject.
- .TextBody
- [String] (RW) The plain text representation of
this message.
- .TextBodyPart
- [IBodyPart] (RO) A reference to the IBodyPart object in which the plain text representation of the message.
|
IDataSource This interface defines a set of properties and methods necessary to bind a message object to a data source which
can be within other CDO bodypart, CDO message, or ADO Stream objects or other objects exposing the IStream interface.
- .ISDirty
- [Boolean] (RW) This boolean specifies whether
the current local data has been changed since the last data source
binding or call to the 'save' method.
- .OpenObject(Source As Object, InterfaceName As
String)
-
(WO) Function to bind and open data from the
specified object to this object. See also CdoInterfaces.
- .Save
-
(WO) Subroutine to save the current local data
into the currently bound data source.
- .SaveToObject(Source As Object, InterfaceName
As String)
-
(WO) Subroutine to bind and save data into the
specified object. See also CdoInterfaces.
- .Source
- [Object] (RO) Returns a reference to the
currently bound object.
- .SourceClass
- [String] (RO) Returns the string identifier of the interface that was used to bind to the current
data source.
|
BodyPart Implements IBodyPart.
- .AddBodyPart(index As Long)
- Function that adds a bodypart to the
'BodyParts' collection and returns a reference to the newly added
object.
- .Bodyparts
- [IBodyParts] (RO) Returns a reference to the
'BodyParts' collection for this object.
- .Charset
- [String] (RW) The character set for the text
type body parts. See CdoCharset.
- .ContentClass
- [String] (RW) The content class for this body
part.
- .ContentMediaType
- [String] (RW) The content type and subtype of this body part. (See cdoContentTypeValues)
- .ContentTransferEncoding
- [String] (RW) The encoding mechanism used to
encode the content of this body part.
- .DataSource
- [IDataSource] (RO) A reference to the
'IDataSource' interface for this object.
- .Fields
- [ADODB.Fields] (RO) Returns a reference to the
'Fields' collection for this object.
-
- Can reference any field in the
following eight collections:
- (cdoContentType) =
CdoContentTypeValues
- (cdoContentDisposition) = [MIME
header field]
- (cdoContentTransferEncoding) =
CdoContentTransferEncoding
- (cdoContentID) = [MIME header
field]
- (cdoContentBase) = [uri]
- (cdoContentLocation) = [uri]
- (cdoContentDisposition) = CdoContentDispositionTypeValues
- (cdoContentMediaType) =
CdoContentTypeValues
- .FileName
- [String] (RO) The filename parameter attribute
commonly used with the Content-Disposition header field.
- .GetDecodedContentStream
- [ADODB.Stream] (RO) Function that returns an ADODB.Stream object
(which exposes the _Stream interface of that object) that contains the
content of the bodypart in decoded format. The formatting method is
controlled by the value set in the Message.MIMEFormatted property of the
associated message and is set to either 'MIME' or 'UUENCODE'.
- .GetEncodedContentStream
- [ADODB.Stream] (RO) Function that returns an ADODB.Stream object
(which exposes the _Stream interface of that object) that contains the
content of the bodypart in encoded format. The formatting method is
controlled by the value set in the Message.MIMEFormatted property of the
associated message and is set to either 'MIME' or 'UUENCODE'.
- .GetFieldParameter(FieldName As String,
Parameter As String)
- Function that returns the specified parameter value for the specified MIME
header field (see list in .Fields above).
- .GetInterface(InterfaceName As String)
- Function that returns the specified dual
interface on the object. (See CdoInterfaces)
- .GetStream
- [ADODB.Stream] (RO) Function that returns and ADODB.Stream object
(which exposes the _Stream interface of that object) that contains the
entire content of the bodypart and all subparts in serialized encoded
format.
- .Parent
- [IBodyPart] (RO) The parent body part object
for this object.
- .SaveToFile(Filename As String)
- (WO) Subroutine to save the specified file to disk.
|
BodyParts Implements IBodyParts This interface defines a set of properties and methods that can be used to added, retreive, and delete BodyPart
items in the BodyParts collection. This collection can be enumerated with the 'for
each' construct, if desired.
- .Add(index As Long)
- Function that adds a BodyPart item to the
collection and returns a reference to the newly added item.
- .Count
- [Long] (RO) Returns the number of BodyPart
items in the collection.
- .Delete(index As Long)
- Subroutine that removes the specified BodyPart
item from the collection.
- .DeleteAll
- Subroutine that removes all BodyPart items from
the collection.
- .Item(index As Long or reference to specific object)
- [IBodyPart] (RO) to the BodyPart item at a
specified Returns a reference t the object at a given index in the collection.
|
CDO.Configuration Implements IConfiguration. This class
provides a complete object providing all properties and methods necessary to implement a message's
transport. This object is bound to the CDO Message object via the Message.Configuration
property.
- .Fields
- [ADODB.Fields] (RO) The Fields collection for the object
-
- Can reference any field in the following two collections:
- CdoConfiguration
- (cdoTimeSoneIDURN) = CdoTimeZoneId
- .Load(LoadFrom As CdoConfigSource)
- Subroutine to load the specified configuration from a specified file.
|
CDO.DropDirectory Implements IDropDirectory. This class provides
a method to create the Messages collection.
- .GetMessages(directoryName As String)
- Function that returns a collection of Message
items found in the specified filesystem directory. An item is created for each file in the directory
with a .eml extension. If directoryName is not specified the default drop directory is assumed.
|
Messages Implements IMessages. This interface defines a set of properties and methods that can
be used to retreive and delete Message items
in the Messages collection. This
collection is created by the DropDirectory.GetMessages function. This collection
can be enumerated with the 'for each' construct, if desired.
- .Count
- [Long] (RO) Returns the number of Message items
in the collection.
- .Delete(index As Long)
- (WO) Subroutine that removes the Message item at a
specified index from the collection and deletes the associated
file from which the object was derived.
- .DeleteAll
- (WO) Subroutine that removes all Message items from
the collection and all associated files from which they were derived.
- .Filename(index As long or object reference)
-
[String] (RO) Returns the file name at a
specified index in the collection from which a message item was derived.
- .Item(index As Long)
-
[IMessage] (RO) Returns a reference to the
Message item at a specified Returns
a reference t the object at a given index in the collection.
|
CDO Constants and Enumerations. A fairly complete list of CDO Constants and Enumerations is available to read or download here: CDOVBS.INC. This
file can be included in ASP applications or portions copied into VBscripts as needed.
|