C#: oMailer.BodyHtmlText = @" Test HTML message.
www.afterlogic.com"; |
VB.NET: oMailer.BodyHtmlText = " Test HTML message. " & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " & vbCrLf & _ " & vbCrLf & _ "www.afterlogic.com" |
C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html); |
VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html) |
C#: oMailer.Message.LoadBodyText(@"C:\Temp\saved_web_page.htm", MessageBodyType.Html); |
VB.NET: oMailer.Message.LoadBodyText("C:\Temp\saved_web_page.htm", MessageBodyType.Html) |
C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm ", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles| ImportBodyOptions.ImportRelatedFilesFromUris); |
VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm ", _ MessageBodyType.Html, _ Encoding.Default, ImportBodyOptions.ImportRelatedFiles Or _ ImportBodyOptions.ImportRelatedFilesFromUris) |
C#: using System; using System.Text; using MailBee; using MailBee.SmtpMail; using MailBee.Mime; namespace EmailApp { class Class1 { [STAThread] static void Main(string[] args) { Smtp oMailer = new Smtp(); oMailer.To.AddFromString("Bill Smith "); oMailer.From.AsString = "John Doe (Company Info)"; oMailer.Subject = "Test web page"; oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris); try { oMailer.Send(); Console.WriteLine("The message has been successfully sent."); } catch (MailBeeSmtpMessageSizeOutOfRangeException e) { Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes)."); } } } } |
VB.NET: Imports System Imports System.Text Imports MailBee Imports MailBee.SmtpMail Imports MailBee.Mime Namespace EmailApp Class Class1 _ Shared Sub Main(ByVal args() As String) Dim oMailer As Smtp = New Smtp() oMailer.To.AddFromString("Bill Smith ") oMailer.From.AsString = "John Doe (Company Info)" oMailer.Subject = "Test web page" oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris) Try oMailer.Send() Console.WriteLine("The message has been successfully sent.") Catch e As MailBeeSmtpMessageSizeOutOfRangeException Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes).") End Try End Sub End Class End Namespace |
【慧都十四周年庆预热开启!全场满额送七级豪礼,AppleMac笔记本电脑、iwatch、iPad等您来拿!】
活动时间:10月1日-10月30日
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("smtp.company.com", "jdoe", "secret"); mailer.SmtpServers.Add(server); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("smtp.company.com","jdoe","secret") mailer.SmtpServers.Add(server) ... mailer.Send() |
C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("mail.domain.com", "user@domain.com", "pass"); mailer.SmtpServers.Add(server); mailer.Connect(); mailer.Hello(); mailer.Login(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("mail.domain.com", "user@domain.com", "pass") mailer.SmtpServers.Add(server) mailer.Connect() mailer.Hello() mailer.Login() |
C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("smtp.company.com", "jdoe", "secret"); server.AuthMethods = AuthenticationMethods.SaslLogin | AuthenticationMethods.SaslPlain | AuthenticationMethods.SaslNtlm; server.AuthOptions = AuthenticationOptions.PreferSimpleMethods; mailer.SmtpServers.Add(server); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("smtp.company.com","jdoe","secret") server.AuthMethods = AuthenticationMethods.SaslLogin _ Or AuthenticationMethods.SaslPlain Or AuthenticationMethods.SaslNtlm server.AuthOptions = AuthenticationOptions.PreferSimpleMethods mailer.SmtpServers.Add(server) ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("mail.domain.com", "jdoe@domain.com", "secret").AuthPopBeforeSmtp = true; ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("mail.domain.com", "jdoe@domain.com", "secret").AuthPopBeforeSmtp = True ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("smtp.domain.com"); mailer.AuthPopBeforeSmtp("pop.domain.com", 110, "jdoe@domain.com", "secret"); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("smtp.domain.com") mailer.AuthPopBeforeSmtp("pop.domain.com", 110, "jdoe@domain.com", "secret") ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("smtp.domain.com", null, null, AuthenticationMethods.SaslNtlm); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("smtp.domain.com", Nothing, Nothing, AuthenticationMethods.SaslNtlm) |
DWObject.ShowImageEditor();