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
)
參數
web
Type: Microsoft.SharePoint.SPWeb代表網站的SPWeb物件。
messageHeaders
Type: System.Collections.Specialized.StringDictionary標頭欄位的成對的名稱和值。
messageBody
Type: System.String包含電子郵件的本文。
appendFooter
Type: System.Boolean要附加至電子郵件 ; 頁尾true否則,請false。
傳回值
Type: System.Boolean
true如果成功,傳送電子郵件否則,請false。
備註
電子郵件將傳送至的地址或"to"、"cc"及"[密件副本"標頭中指定的地址。
注意事項 |
---|
此方法支援僅以有效的 SharePoint 使用者電子郵件地址傳送電子郵件訊息。 |