This documentation is archived and is not being maintained.

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)

Public ReadOnly Property To As EmailRecipientCollection
Dim instance As EmailMessage
Dim value As EmailRecipientCollection

value = instance.To

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.