共用方式為


SPOutboundMailServiceInstance class

代表用於Microsoft SharePoint Foundation用來傳送輸出郵件的簡易郵件傳送通訊協定 (SMTP) 服務的執行個體。

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)

Syntax

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

備註

使用SPWebApplication類別之OutboundMailServiceInstance屬性可傳回外寄郵件服務執行個體所使用的 Web 應用程式中。

使用SPOutboundMailService類別繼承的Instances屬性可傳回SPServiceInstanceDependencyCollection物件,代表所有外寄郵件服務的執行個體。使用SPOutboundMailServiceInstanceCollection建構函式,傳回集合的外寄郵件在特定的伺服器執行的服務執行個體。

若要從集合中傳回單一的外寄郵件服務執行個體使用索引器。例如,若集合已指派給變數myOutboundMailServiceInstances,使用myOutboundMailServiceInstances[index]以 C# 或 Visual Basic 中的myOutboundMailServiceInstances(index)index所在的名稱或 GUID,會識別集合中的服務執行個體。

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.

請參閱

參照

SPOutboundMailServiceInstance members

Microsoft.SharePoint.Administration namespace