C#: MailBee.SmtpMail.Smtp.QuickSend("from@me.com", "to@you.com", "Subject", "Message Body"); |
VB.NET: MailBee.SmtpMail.Smtp.QuickSend("from@me.com", "to@you.com", "Subject", "Message Body") |
C#: MailBee.SmtpMail.Smtp.QuickSend("From Me (Company Info)", "To you ", "Subject", "Plain text body", "HTML-formatted body", null, @"C:\My Documents\report.doc"); |
VB.NET: MailBee.SmtpMail.Smtp.QuickSend("From Me (Company Info)", _ "To you ", _ "Subject", "Plain text body", _ "«html»HTML-formatted body«/html»", _ Nothing, "C:\My Documents\report.doc") |
C#: Smtp oMailer = new Smtp(); |
VB.NET: Dim oMailer As New Smtp() |
C#: oMailer.SmtpServers.Add("smtp.domain.com"); |
VB.NET: oMailer.SmtpServers.Add("smtp.domain.com") |
C#: oMailer.SmtpServers.Add("127.0.0.1"); |
VB.NET: oMailer.SmtpServers.Add("127.0.0.1") |
C#: oMailer.SmtpServers.Add("smtp.domain.com","login","password"); |
VB.NET: oMailer.SmtpServers.Add("smtp.domain.com","login","password") |
C#: oMailer.SmtpServers.Add("127.0.0.1","login","password"); |
VB.NET: oMailer.SmtpServers.Add("127.0.0.1","login","password") |
C#: oMailer.From.AsString = "Dan Brown (Company Info)"; |
VB.NET: oMailer.From.AsString = "Dan Brown (Company Info)" |
C#: oMailer.From.AsString = "Dan Brown "; |
VB.NET: oMailer.From.AsString = "Dan Brown " |
C#: oMailer.From.AsString = "dan@domain.com"; |
VB.NET: oMailer.From.AsString = "dan@domain.com" |
C#: oMailer.To.AsString = "Bill Smith (Remarks), Kathy@mail.com "; oMailer.Cc.AsString = "Joe Black , Joseph "; oMailer.Bcc.AsString = "t.jay@domain.com, s.connor@domain.com"; oMailer.ReplyTo.AsString = "john@domain.com, Barbara Jones "; |
VB.NET: oMailer.To.AsString = "Bill Smith (Remarks), Kathy@mail.com " oMailer.Cc.AsString = "Joe Black , Joseph " oMailer.Bcc.AsString = "t.jay@domain.com, s.connor@domain.com" oMailer.ReplyTo.AsString = "john@domain.com, Barbara Jones " |
C#: oMailer.Subject = "Test message"; |
VB.NET: oMailer.Subject = "Test message" |
C#: oMailer.BodyPlainText = "This is a test e-mail message."; |
VB.NET: oMailer.BodyPlainText = "This is a test e-mail message." |
C#: oMailer.BodyHtmlText = @" Test HTML message.
www.afterlogic.com"; |
VB.NET: oMailer.BodyHtmlText = " Test HTML message. " & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ "www.afterlogic.com" |
C#: oMailer.AddAttachment(@"C:\annual_reoprt.xls"); oMailer.AddAttachment(@"C:\deposits.doc"); |
VB.NET: oMailer.AddAttachment("C:\annual_reoprt.xls") oMailer.AddAttachment("C:\deposits.doc") |
C#: try { oMailer.Send(); Console.WriteLine("The message has been successfully sent."); } catch (MailBeeSmtpRefusedRecipientException e) { Console.WriteLine("The following recipient was refused by SMTP server: " + e.RefusedRecipientEmail); } |
VB.NET: Try oMailer.Send() Console.WriteLine("The message has been successfully sent.") Catch e As MailBeeSmtpRefusedRecipientException Console.WriteLine("The following recipient was refused by SMTP server: " + e.RefusedRecipientEmail) End Try |
C#: using System; using MailBee; using MailBee.SmtpMail; namespace EmailApp { class Class1 { [STAThread] static void Main(string[] args) { Smtp oMailer = new Smtp(); oMailer.From.AsString = "John Doe (Company Info)"; oMailer.To.AsString = "Bill Smith , Kathy Ritchie (Company Info)"; oMailer.Subject = "Test e-mail"; oMailer.BodyPlainText = "This is a test e-mail message."; oMailer.BodyHtmlText = @" Test HTML message.
www.afterlogic.com"; oMailer.AddAttachment(@"C:\annual_reoprt.xls"); oMailer.SmtpServers.Add("127.0.0.1", "login", "password"); oMailer.SmtpServers[0].AllowRefusedRecipients = false; try { oMailer.Send(); Console.WriteLine("The message has been successfully sent."); } catch (MailBeeSmtpRefusedRecipientException e) { Console.WriteLine("The following recipient was refused by SMTP server: "+ e.RefusedRecipientEmail); } } } } |
VB.NET: Imports System Imports MailBee Imports MailBee.SmtpMail Namespace EmailApp Class Class1 _ Shared Sub Main(ByVal args() As String) Dim oMailer As New Smtp() oMailer.From.AsString = "John Doe (Company Info)" oMailer.To.AsString = "Bill Smith , Kathy Ritchie (Company Info)" oMailer.Subject = "Test e-mail" oMailer.BodyPlainText = "This is a test e-mail message." oMailer.BodyHtmlText = " Test HTML message. " & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ "www.afterlogic.com" oMailer.AddAttachment("C:\annual_reoprt.xls") oMailer.SmtpServers.Add("127.0.0.1", "login", "password") oMailer.SmtpServers(0).AllowRefusedRecipients = False Try oMailer.Send() Console.WriteLine("The message has been successfully sent.") Catch e As MailBeeSmtpRefusedRecipientException Console.WriteLine("The following recipient was refused by SMTP server: "+ e.RefusedRecipientEmail) End Try End Sub End Class End Namespace |
试用、下载、了解更多产品信息请点击"咨询在线客服"
foreach await (string s in asyncStream)
async IAsyncEnumerable MethodName()
extension CustomerExt extends Customer { //定义方法和属性的代码。 }