Platform SDK: CDO for Windows 2000

To Property

The To property specifies the principal (To) recipients for the message.

[Visual Basic]
Property To as String
[C++]
HRESULT get_To(BSTR* pVal);
HRESULT put_To(BSTR Val);
IDL]
HRESULT [propget] To([out,retval] BSTR* pVal);
HRESULT [propput] To([in] BSTR Val);

Remarks

This property is also available as the urn:schemas:mailheader:to and urn:schemas:httpmail:to fields.

The string in the To property can represent a single recipient or multiple recipients. For example, each of the following qualifies as a full messaging address:

"User Address" <UserAddress@microsoft.com>
<UserAddress@microsoft.com>
UserAddress@microsoft.com

In lists with multiple recipients, addresses are separated by commas:

"User 1" <User1@microsoft.com>, User2@microsoft.com, <User3@microsoft.com>

A comma is not allowed in any part of a messaging address unless it is contained within quotation marks.

The default value of the To property is an empty string.

See Also

urn:schemas:mailheader:to

urn:schemas:httpmail:to