EmailMessage.To property
The To property gets the primary recipients of the message.
Namespace: Microsoft.Exchange.Data.Transport.Email
Assembly: Microsoft.Exchange.Data.Transport (in Microsoft.Exchange.Data.Transport.dll)
Syntax
'Declaration
Public ReadOnly Property To As EmailRecipientCollection
Get
'Usage
Dim instance As EmailMessage
Dim value As EmailRecipientCollection
value = instance.To
public EmailRecipientCollection To { get; }
Property value
Type: Microsoft.Exchange.Data.Transport.Email.EmailRecipientCollection
Remarks
Your agent might receive e-mail messages with zero recipients. This can happen if an application adds recipients to a message or in an agent that performs logging or diagnostics. When you implement your agent, check for the presence of recipients in the To property to avoid encountering an exception.