Compartilhar via


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

Sends the e-mail message to the specified address.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)> _
Public Shared Function SendEmail ( _
    web As SPWeb, _
    messageHeaders As StringDictionary, _
    messageBody As String, _
    appendFooter As Boolean _
) As Boolean
'Usage
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)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static bool SendEmail(
    SPWeb web,
    StringDictionary messageHeaders,
    string messageBody,
    bool appendFooter
)

Parameters

  • messageBody
    Type: System.String

    Contains the body of the e-mail message.

  • appendFooter
    Type: System.Boolean

    true to append a footer to the e-mail message; otherwise, false.

Return Value

Type: System.Boolean
true if the e-mail message is sent successfully; otherwise, false.

Remarks

The e-mail message will be sent to the address or addresses specified in the "to", "cc", and "bcc" headers.

See Also

Reference

SPUtility Class

SPUtility Members

SendEmail Overload

Microsoft.SharePoint.Utilities Namespace