SPUtility.SendEmail method (SPWeb, Boolean, Boolean, String, String, String)
傳送電子郵件訊息。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function SendEmail ( _
web As SPWeb, _
fAppendHtmlTag As Boolean, _
fHtmlEncode As Boolean, _
to As String, _
subject As String, _
htmlBody As String _
) As Boolean
'用途
Dim web As SPWeb
Dim fAppendHtmlTag As Boolean
Dim fHtmlEncode As Boolean
Dim to As String
Dim subject As String
Dim htmlBody As String
Dim returnValue As Boolean
returnValue = SPUtility.SendEmail(web, _
fAppendHtmlTag, fHtmlEncode, to, _
subject, htmlBody)
public static bool SendEmail(
SPWeb web,
bool fAppendHtmlTag,
bool fHtmlEncode,
string to,
string subject,
string htmlBody
)
參數
web
Type: Microsoft.SharePoint.SPWeb代表網站的Microsoft.SharePoint.SPWeb物件。
fAppendHtmlTag
Type: System.Boolean要附加至訊息的 HTML 標籤true否則,請false。
fHtmlEncode
Type: System.Booleantrue編碼郵件,並取代字元的 HTML 標籤實體 ;否則,請false。
to
Type: System.String要傳送電子郵件地址。
subject
Type: System.String內含電子郵件的主旨的字串。
htmlBody
Type: System.String內含電子郵件訊息本文的字串。
傳回值
Type: System.Boolean
true如果成功,傳送電子郵件否則,請false。
備註
電子郵件將傳送至"to"、"cc"及"[密件副本"標頭中指定的地址 (或地址)。
注意事項 |
---|
此方法支援僅以有效的 SharePoint 使用者電子郵件地址傳送電子郵件訊息。 |
請參閱
參照
Microsoft.SharePoint.Utilities namespace
其他資源
MIME 標頭