将电子邮件发送到指定的地址。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
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
类型:Microsoft.SharePoint.SPWebSPWeb对象表示该网站。
messageHeaders
类型:System.Collections.Specialized.StringDictionary标头字段的名称 / 值对。
messageBody
类型:System.String包含电子邮件的正文。
appendFooter
类型:System.Booleantrue要追加到的电子邮件 ; 的页脚否则为false。
返回值
类型:System.Boolean
true如果成功,则发送该电子邮件否则为false。
备注
电子邮件将发送到的地址或在"收件人"、"抄送"和"密件抄送"标题中指定的地址。
备注
此方法支持仅对有效的 SharePoint 用户电子邮件地址发送电子邮件。