|SmtpQuickSend Method (String, String, String, String, String, String, String)|
public static void QuickSend( string from, string to, string subject, string plainTextBody, string htmlBody, string charset, string attachmentFilename )
Public Shared Sub QuickSend ( from As String, to As String, subject As String, plainTextBody As String, htmlBody As String, charset As String, attachmentFilename As String )
|MailBeeException||An error occurred.|
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.
|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).
MailBee.SmtpMail.Smtp.QuickSend("John Doe <email@example.com>", "Kathy Smith <firstname.lastname@example.org>", "The requested document", null, "<html>Please find the report in the attached document</html>", null, @"C:\My Documents\report.doc");
MailBee.SmtpMail.Smtp.QuickSend("John Doe <email@example.com>", _ "Kathy Smith <firstname.lastname@example.org>", "The requested document", Nothing, _ "<html>Please find the report in the attached document</html>", Nothing, _ "C:\My Documents\report.doc")