




C#
// Create SMTP object
Smtp mailer = new Smtp();
// Set the message fields.
mailer.From.AsString = "jdoe@domain.com";
mailer.To.AsString = "bill@domain2.com";
mailer.Subject = "Hi";
mailer.BodyPlainText = "This is test message";
// Starts logging SMTP activities into a file.
mailer.Log.Enabled = true;
mailer.Log.Filename = @"C:\log.txt";
mailer.Log.Clear();
// Specify the server to use. If your server does not require authentication,
// just omit both last parameters.
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret");
// Attempt to connect.
mailer.Connect();
// Display the host name of the server the connection was established with.
Console.WriteLine("Connected to " + mailer.SmtpServers[mailer.GetCurrentSmtpServerIndex()].Name);
// Make sure all the recipients are ok.
if (mailer.TestSend(SendFailureThreshold.AllRecipientsFailed) != TestSendResult.OK)
{
Console.WriteLine("No recipients can receive the message.");
}// Show refused recipients if any
else if (mailer.GetRefusedRecipients().Count > 0)
{
Console.WriteLine("The following recipients failed: " + mailer.GetRefusedRecipients().ToString());
}
else
{
Console.WriteLine("All recipients are ok. Will send the message now.");
// Send e-mail. If it cannot be delivered, bounce will
// arrive to bounce@domain3.com, not to joe@domain1.com
mailer.Send("bounce@domain.com", (string)null);
Console.WriteLine("Sent to: " + mailer.GetAcceptedRecipients().ToString());
}
// Disconnect from the server
mailer.Disconnect();VB.NET
' Create SMTP object
Dim mailer As New Smtp
' Set the message fields.
mailer.From.AsString = "jdoe@domain.com"
mailer.To.AsString = "bill@domain2.com"
mailer.Subject = "Hi"
mailer.BodyPlainText = "This is test message"
' Starts logging SMTP activities into a file.
mailer.Log.Enabled = True
mailer.Log.Filename = "C:\log.txt"
mailer.Log.Clear()
' Specify the server to use. If your server does not require authentication,
' just remove last 2 parameters.
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret")
' Attempt to connect.
mailer.Connect()
' Display the host name of the server the connection was established with.
Console.WriteLine("Connected to " + mailer.SmtpServers(mailer.GetCurrentSmtpServerIndex()).Name)
' Make sure all the recipients are ok.
If mailer.TestSend(SendFailureThreshold.AllRecipientsFailed) <> TestSendResult.OK Then
Console.WriteLine("No recipients can receive the message.")
Else
' Show refused recipients if any
If mailer.GetRefusedRecipients().Count > 0 Then
Console.WriteLine("The following recipients failed: " & mailer.GetRefusedRecipients().ToString())
Else
Console.WriteLine("All recipients are ok. Will send the message now.")
' Send e-mail. If it cannot be delivered, bounce will
' arrive to bounce@domain3.com, not to joe@domain1.com
mailer.Send("bounce@domain.com", CType(Nothing, String))
Console.WriteLine("Sent to: " + mailer.GetAcceptedRecipients().ToString())
End If
End If
' Disconnect from the server
mailer.Disconnect()





























试用、下载、了解更多产品信息请点击"咨询在线客服"
![]() | Code-First服务器对Remoting SDK 9最重要的加强是增加了新的Code First服务器。忽略在Service Builder中手动定义服务接口,并保持RODL和代码同步。 只需在代码中定义你的服务,Remoting SDK就完成了。同时支持.NET和Delphi服务器。
| |
![]() | 所有新的CodeGen使用开源CodeGen4框架可以完全修改和简化Remoting SDK客户端存根的代码生成。实际上Remoting SDK-specific codegen logic也是开源的,如有必要,你可以很容易地调整它来满足的需要。 这是Mac和Windows 的rodl2code命令行工具并集成到Fire,Visual Studio,Delphi和Service Builder的补充。
| |
![]() | Mac新的Service Importer app我们还为Mac创建了一个全新的应用程序,用于连接到远程服务,导入其RODLs并使用CodeGen4为所有语言生成必要的代码存根。开发人员在不使用IDE与专用的Remoting SDK集成的情况下仍然可以轻松连接。
| |
![]() | 在Swift中创建构建服务器Mac和iOS开发人员现在可以在他们的Mac(使用我们免费的Swift编译器和IDE、Fire)上的Swift中创建服务器应用程序,并将它们部署到Linux、Windows和Mac OS X服务器中。 阅读有关Fire的更多信息或浏览Remoting SDK 文档。 当然,你也可以在Fire、for Cocoa、Java / Android和.NET中创建客户端应用程序。
| |
![]() | 完全支持SwiftRemoting SDK 9使用Xcode或Elements添加了在Swift中编写客户端的功能。支持Swift CodeGen并优化和注释了该库。 | |
![]() | 连接服务器的新工作流程连接服务器的新工作流程 在所有三个IDE中,使用新的“连接到服务器”菜单选项可以简化将任何客户端应用程序项目连接到服务器的过程。只需将IDE指向你的服务器的URL,你的项目将自动变成一个Remoting SDK客户端,并创建所有必要的引用和代码存根。 新的.remoteRODL文件让你的客户端项目与服务器保持同步,并且一个新的ServerAccess类存根将帮助你开始调用你的服务器。
| |
![]() | 改进SSL&TSL安全通信比以往更重要,Remoting SDK可以让你的服务器通过HTTPS和TLS进行安全通信变得非常容易。无论你使用的是自动生成、自签名还是已购买的证书,现在都可以设置两个属性来实现安全连接。
| |
![]() | 减少样板代码我们已经从根本上抽出了很多需要的板卡代码来使一个服务器完全运行起来。 使用RO9,你现在可以使用一行虚拟代码启动一个服务器 - 包括支持运行组合模式(GUI、命令行和后台服务)、设置SSL等。
| |
![]() | 创建watchOS应用程序Remoting SDK 9增加了从Apple Watch apps连接到你的服务器的功能,让你的用户可以直接在手腕上访问网络驱动的信息。
| |
![]() | 创建tvOS应用程序同样,你现在可以在你的tvOS apps中使用Remoting SDK客户端功能,将你的数据和服务器内容呈现到大屏幕上。 watchOS和tvOS客户端库都使用与现有的iOS和OS X库相同的代码库,因此在所有四个Apple平台上共享客户端代码非常容易。
|











2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!

2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
