SmtpQuickSend Method (MailMessage)
Sends a mail message, in a single line of code.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public static void QuickSend(
	MailMessage message
)

Parameters

message
Type: MailBee.MimeMailMessage
The MailMessage object representing the mail message to be sent.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred.
Remarks

This method allows the developer to send a mail message without needing to create an instance of Smtp component.

The message will be sent in direct send mode. MailBee will discover SMTP servers of recipients domains via DNS MX lookup, and then send the message directly to these SMTP MX servers. No dedicated SMTP relay server is used.

DNS servers for MX lookup are taken either from the config file (such as app.config, web.config, or machine.config) or from operating system settings if the config file contains no DNS server definitions. See Autodetect method for more information.

Note Note
Although this method is static, it still requires valid license key be assigned to the Smtp class. The developer can set the key either in the config file or in the code (by setting MailBee.Global.LicenseKey property value).

This method is not async, it's recommended (and in case of UWP platform it's mandatory) to use sync methods like SendAsync(String, EmailAddressCollection).

Examples
This sample creates a simple plain-text mail message and then sends it.
// To use the code below, import MailBee namespaces at the top of your code
using MailBee;
using MailBee.SmtpMail;
using MailBee.Mime;

// The actual code (put it into a method of your class)

// Prepare the message.
MailMessage msg = new MailMessage();
msg.From.AsString = "John Doe <jdoe@domain.com>";
msg.To.AsString = "Kathy Smith <kathy.smith@company.com>";
msg.Subject = "Meeting request";
msg.BodyPlainText = "Hi Kathy,\r\nCan we meet tomorrow?\r\nRegards, John";

// Send it.
Smtp.QuickSend(msg);
See Also