我想通过.net Core使用SMTP服务器发送电子邮件。
请解释一下。
请解释一下。
通过 .net core 框架,目前还无法实现。
截至编写本文时,.net core 版本 1.1 实现了 .net standard 1.6。在那个时间点上,System.Net.Mail 还没有被移植。但正如您可以从此 pull request(https://github.com/dotnet/corefx/pull/12416)看到的那样,它似乎将会进入 .net Standard 2.0(很可能随后实现在 .net core 的下一个版本中)。
与此同时,似乎每个人都在使用 MailKit 库(https://github.com/jstedfast/MailKit),它运行得非常好!