使用.Net Core中的smtp服务器发送电子邮件? [英] Sending a Email using smtp server in .Net Core?
问题描述
我想通过.net Core使用SMTP服务器发送电子邮件。
请说明
I would like to send email using SMTP server through .net Core.
Please explain
推荐答案
通过.net核心框架,您现在无法保持现状。
Through the .net core framework, you can't as it stands right now.
在撰写本文时,.net核心版本1.1实现了.net标准1.6。当时,尚未移植System.Net.Mail。但是正如您通过此拉取请求所看到的: https://github.com/dotnet/corefx/pull / 12416 。看起来它即将加入.net Standard 2.0(然后可能会在下一版.net core中实现)。
At the time of writing .net core version 1.1 implements the .net standard of 1.6. At that point in time, System.Net.Mail had not been ported. But as you can see by this pull request : https://github.com/dotnet/corefx/pull/12416 . It looks it's going to make it into .net Standard 2.0 (Which will likely then be implemented in the next version of .net core).
同时,似乎每个人都在使用MailKit库( https://github.com/jstedfast/MailKit ),效果很好!
In the meantime, it seems like everyone is using the library MailKit (https://github.com/jstedfast/MailKit) which works pretty well!
这篇关于使用.Net Core中的smtp服务器发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!