To Property

Topic Last Modified: 2006-12-01

Contains a list of principal (To) recipients for this message.

Applies To

IMessage Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

Property To As String

HRESULT get_To(BSTR* pVal);

Parameters

  • pVal
    Returns the value of the To property as a reference to a BSTR.

Remarks

This property is also available as the urn:schemas:mailheader:to field (to Field) and the urn:schemas:http:to field (to Field).

The string in the To property can represent a single recipient or multiple recipients. See the BCC Property for more information about formatting and setting e-mail address properties.

You must set at least one recipient in either the BCC Property, the CC Property, or the To property. If you call the Post Method or the Send Method without designating at least one recipient, an error is returned.

The default value of To is an empty string.