Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Contains a list of principal (To) recipients for this 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);
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
Multiple recipients in the list are separated by commas:
"User 1" <User1@microsoft.com>, User2@microsoft.com, <User3@microsoft.com>
Commas are not parsed as separators when enclosed in double quotes, such as:
"John Jones, Jr." <jjones@microsoft.com>, "Jane Doe" <JaneDoe@microsoft.com>
The quotes must appear as characters in the string. These quotes are not those used to denote a string in Visual Basic or C++. For example,
iMsg.To = " ""John Jones, Jr."" <jjones@microsoft.com>, ""Jane Doe"" <JaneDoe@microsoft.com>"
in Visual Basic, or
pMsg->put_To(_bstr_t(" \"John Jones, Jr.\" <jjones@microsoft.com>, \"Jane Doe\" <JaneDoe@microsoft.com>"));
in C++.
You must set at least one recipient in at least one of the BCC, CC, or To properties. If you call the Post or Send method without designating at least one recipient, an error is returned.
The default value of To is an empty string.