To Property

To Property

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

Syntax

Property To as String
HRESULT get_To(BSTR* pVal);
HRESULT put_To(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" <example@example.com>
<example@example.com>
example@example.com

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

"User 1" <example1@example.com>, example2@example.com, <example3@example.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

Concepts

urn:schemas:mailheader:to Field
to Field