Export (0) Print
Expand All

SPUtility.SendEmail Method (SPWeb, StringDictionary, String)

Sends an e-mail message.

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

[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)]
public static bool SendEmail(
	SPWeb web,
	StringDictionary messageHeaders,
	string messageBody
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb

An SPWeb object that represents the site.

messageHeaders
Type: System.Collections.Specialized.StringDictionary

The name-value pairs for header fields.

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.

Show:
© 2014 Microsoft