SmtpMail::Send Method (MailMessage^)

 

Sends an e-mail message using arguments supplied in the properties of the MailMessage class. Recommended alternative: System.Net.Mail.

Namespace:   System.Web.Mail
Assembly:  System.Web (in System.Web.dll)

public:
[AspNetHostingPermissionAttribute(SecurityAction::Demand, Level = AspNetHostingPermissionLevel::Medium)]
[SecurityPermissionAttribute(SecurityAction::Assert, UnmanagedCode = true)]
static void Send(
	MailMessage^ message
)

Parameters

message
Type: System.Web.Mail::MailMessage^

The MailMessage to send.

Exception Condition
COMException

The mail cannot be sent.

PlatformNotSupportedException

The Send method requires the Microsoft Windows NT, Windows 2000, or Windows XP operating system.

The following example shows how to use MailMessage to send an e-mail message using SmtpMail.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: