Condividi tramite


SPOutboundMailServiceInstance Class

Represents an instance of a Simple Mail Transfer Protocol (SMTP) service that is used in Microsoft SharePoint Foundation to send outbound mail.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPPersistedObject
      Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
        Microsoft.SharePoint.Administration.SPServiceInstance
          Microsoft.SharePoint.Administration.SPOutboundMailServiceInstance

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<GuidAttribute("FF859B31-F963-4683-A9E8-7CAE97A867B8")> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class SPOutboundMailServiceInstance _
    Inherits SPServiceInstance
'Usage
Dim instance As SPOutboundMailServiceInstance
[GuidAttribute("FF859B31-F963-4683-A9E8-7CAE97A867B8")]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPOutboundMailServiceInstance : SPServiceInstance

Remarks

Use the OutboundMailServiceInstance property of the SPWebApplication class to return the outbound mail service instance that is used in a Web application.

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.

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.

See Also

Reference

SPOutboundMailServiceInstance Members

Microsoft.SharePoint.Administration Namespace