【问题标题】:Sending a Email using smtp server in .Net Core? [closed]在 .Net Core 中使用 smtp 服务器发送电子邮件? [关闭]
【发布时间】:2017-01-11 06:10:47
【问题描述】:

我想通过 .net Core 使用 SMTP 服务器发送电子邮件。
请解释

【问题讨论】:

标签: c# asp.net-mvc .net-core


【解决方案1】:

通过 .net 核心框架,您不能像现在这样。

在撰写本文时,.net 核心版本 1.1 实现了 .net 1.6 标准。那时,System.Net.Mail 还没有被移植。但正如您在此拉取请求中看到的那样:https://github.com/dotnet/corefx/pull/12416。看起来它将进入 .net Standard 2.0(很可能会在 .net core 的下一个版本中实现)。

与此同时,似乎每个人都在使用运行良好的库 MailKit (https://github.com/jstedfast/MailKit)!

【讨论】:

  • 备案:即使在此 PR 被合并后,官方 API 文档还是建议使用 MailKit 和 MimeKit 而不是 SMTPClient API
猜你喜欢
  • 2018-06-25
  • 2012-06-10
  • 2016-09-07
  • 1970-01-01
  • 1970-01-01
  • 2021-10-01
  • 2015-06-19
相关资源
最近更新 更多