共用方式為


SPUtility.SendEmail method (SPWeb, StringDictionary, String)

傳送電子郵件訊息。

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 _
) As Boolean
'用途
Dim web As SPWeb
Dim messageHeaders As StringDictionary
Dim messageBody As String
Dim returnValue As Boolean

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

參數

傳回值

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

備註

電子郵件將傳送至"to"、"cc"及"[密件副本"標頭中指定的地址 (或地址)。標頭值包含的內容類型、 日期與時間,均已傳送郵件,以及與適當的格式顯示一則訊息相關聯的其他欄位。

注意事項注意事項

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

請參閱

參照

SPUtility class

SPUtility members

SendEmail overload

Microsoft.SharePoint.Utilities namespace