我曾尝试在各种框架中引用 system.net.mail:
framework: "net451"
dependency: "System.Net.Mail": "1.0.0-rc2-00001"
error: does not support framework
framework: "net46"
dependency: "System.Net.Mail": "1.0.0-rc2-00001"
error: does not support framework
framework: "dotnet5.4"
System.Net.Mail not available
framework: "dnx46"
System.Net.Mail not available
我还尝试使用从 NuGet 安装的电子邮件包 MailKit 1.2.21。
"net46": {
"dependencies": {
"MailKit": "1.2.21"
}
如果我引用 MailKit 类,错误:“找不到命名空间的类型”。
如何在 MVC 6 中发送电子邮件?