I would like to send email using SMTP server through .net Core.
Please explain
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Through the .net core framework, you can't as it stands right now.
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).
In the meantime, it seems like everyone is using the library MailKit (https://github.com/jstedfast/MailKit) which works pretty well!