WebMail.Send Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends the specified message to an SMTP server for delivery.
public static void Send(string to, string subject, string body, string from = default, string cc = default, System.Collections.Generic.IEnumerable<string> filesToAttach = default, bool isBodyHtml = true, System.Collections.Generic.IEnumerable<string> additionalHeaders = default, string bcc = default, string contentEncoding = default, string headerEncoding = default, string priority = default, string replyTo = default);
static member Send : string * string * string * string * string * seq<string> * bool * seq<string> * string * string * string * string * string -> unit
Public Shared Sub Send (to As String, subject As String, body As String, Optional from As String = null, Optional cc As String = null, Optional filesToAttach As IEnumerable(Of String) = null, Optional isBodyHtml As Boolean = true, Optional additionalHeaders As IEnumerable(Of String) = null, Optional bcc As String = null, Optional contentEncoding As String = null, Optional headerEncoding As String = null, Optional priority As String = null, Optional replyTo As String = null)
Parameters
- to
- String
The email address of the recipient or recipients. Separate multiple recipients using a semicolon (;).
- subject
- String
The subject line for the email message.
- body
- String
The body of the email message. If isBodyHtml
is true, HTML in the body is interpreted as markup.
- from
- String
(Optional) The email address of the message sender, or null to not specify a sender. The default value is null.
- cc
- String
(Optional) The email addresses of additional recipients to send a copy of the message to, or null if there are no additional recipients. Separate multiple recipients using a semicolon (;). The default value is null.
- filesToAttach
- IEnumerable<String>
(Optional) A collection of file names that specifies the files to attach to the email message, or null if there are no files to attach. The default value is null.
- isBodyHtml
- Boolean
(Optional) true to specify that the email message body is in HTML format; false to indicate that the body is in plain-text format. The default value is true.
- additionalHeaders
- IEnumerable<String>
(Optional) A collection of headers to add to the normal SMTP headers included in this email message, or null to send no additional headers. The default value is null.
- bcc
- String
(Optional) The email addresses of additional recipients to send a "blind" copy of the message to, or null if there are no additional recipients. Separate multiple recipients using a semicolon (;). The default value is null.
- contentEncoding
- String
(Optional) The encoding to use for the body of the message. Possible values are property values for the Encoding class, such as UTF8. The default value is null.
- headerEncoding
- String
(Optional) The encoding to use for the header of the message. Possible values are property values for the Encoding class, such as UTF8. The default value is null.
- priority
- String
(Optional) A value ("Normal", "Low", "High") that specifies the priority of the message. The default is "Normal".
- replyTo
- String
(Optional) The email address that will be used when the recipient replies to the message. The default value is null, which indicates that the reply address is the value of the From property.