共用方式為


SPUtility.SendEmail method (SPWeb, StringDictionary, String, Boolean)

將電子郵件傳送至指定的地址。

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function SendEmail ( _
    web As SPWeb, _
    messageHeaders As StringDictionary, _
    messageBody As String, _
    appendFooter As Boolean _
) As Boolean
'用途
Dim web As SPWeb
Dim messageHeaders As StringDictionary
Dim messageBody As String
Dim appendFooter As Boolean
Dim returnValue As Boolean

returnValue = SPUtility.SendEmail(web, _
    messageHeaders, messageBody, appendFooter)
public static bool SendEmail(
    SPWeb web,
    StringDictionary messageHeaders,
    string messageBody,
    bool appendFooter
)

參數

  • appendFooter
    Type: System.Boolean

    要附加至電子郵件 ; 頁尾true否則,請false。

傳回值

Type: System.Boolean
true如果成功,傳送電子郵件否則,請false。

備註

電子郵件將傳送至的地址或"to"、"cc"及"[密件副本"標頭中指定的地址。

注意事項注意事項

此方法支援僅以有效的 SharePoint 使用者電子郵件地址傳送電子郵件訊息。

請參閱

參照

SPUtility class

SPUtility members

SendEmail overload

Microsoft.SharePoint.Utilities namespace