MailAccountCollection Class

The MailAccountCollection class represents a collection of MailAccount objects that represent all the mail accounts defined on the SQL Server Database Mail subsystem.

Namespace:  Microsoft.SqlServer.Management.Smo.Mail
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public NotInheritable Class MailAccountCollection _
    Inherits SimpleObjectCollectionBase
'Usage
Dim instance As MailAccountCollection
public sealed class MailAccountCollection : SimpleObjectCollectionBase
public ref class MailAccountCollection sealed : public SimpleObjectCollectionBase
[<SealedAttribute>]
type MailAccountCollection =  
    class
        inherit SimpleObjectCollectionBase
    end
public final class MailAccountCollection extends SimpleObjectCollectionBase

Remarks

A MailAccountCollection object can be used to gain access to a set of mail accounts. You can use the Item property to return a specific MailAccount object.

Thread Safety

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

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.