SPOutboundMailServiceInstanceCollection Class
Represents a collection of SPOutboundMailServiceInstance objects.
Inheritance Hierarchy
System.Object
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPOutboundMailServiceInstance>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPOutboundMailServiceInstance>
Microsoft.SharePoint.Administration.SPOutboundMailServiceInstanceCollection
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPOutboundMailServiceInstanceCollection _
Inherits SPPersistedChildCollection(Of SPOutboundMailServiceInstance)
Dim instance As SPOutboundMailServiceInstanceCollection
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPOutboundMailServiceInstanceCollection : SPPersistedChildCollection<SPOutboundMailServiceInstance>
Remarks
Use the inherited Instances property of the SPOutboundMailService class to return an SPServiceInstanceDependencyCollection object that represents all instances of the outbound mail service. Use the SPOutboundMailServiceInstanceCollection constructor to return the collection of outbound mail service instances that are running on a specific server. To add a service instance to the collection, use the Add method of the SPPersistedChildCollection<T> class.
Use an indexer to return a single outbound mail service instance from the collection. For example, if the collection is assigned to a variable named myOutboundMailServiceInstances, use myOutboundMailServiceInstances[index] in C#, or myOutboundMailServiceInstances(index) in Visual Basic, where index is either the name or the GUID that identifies the service instance in the collection.
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.