Share via

SPUtility.SendEmail method (SPWeb, StringDictionary, String)

Sends an e-mail message.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


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


  • messageBody
    Type: System.String

    Contains the body of the e-mail message.

Return value

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


The e-mail message will be sent to the address (or addresses) specified in the “to”, “cc”, and “bcc” headers. Header values include the content-type, the date and time that the message was transferred, and other fields associated with displaying a message in the proper format.


This method supports sending email messages only to valid SharePoint user email addresses.

See also


SPUtility class

SPUtility members

SendEmail overload

Microsoft.SharePoint.Utilities namespace