Expand
MailAddressCollection Class

Store e-mail addresses that are associated with an e-mail message.

Namespace:  System.Net.Mail
Assembly:  System (in System.dll)
Syntax

'Declaration

Public Class MailAddressCollection _
	Inherits Collection(Of MailAddress)
Remarks

The MailMessage.To, MailMessage.CC, and MailMessage.Bcc properties return instances of this class that are used to hold the respective e-mail addresses.

For details on the mail address formats supported by the MailAddressCollection class, see the MailAddress class.

Examples

The following example adds an e-mail address to the MailAddressCollection that is returned by the Bcc property.

This language is not supported or no code example is available.
Inheritance Hierarchy

System.Object
  System.Collections.ObjectModel.Collection(Of MailAddress)
    System.Net.Mail.MailAddressCollection
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Community ContentAdd
Page view tracker