我正在尝试使用我的MVC5应用程序发送电子邮件。为此,我通过NuGet包管理器安装了Mailkit v1.22.0。我的代码是这样的:
var FromAddress = "no-reply@email.com";
var FromAddressTitle = "My Org";
var connection = ConfigurationManager.ConnectionStrings["SmtpServer"].ConnectionString;
var Email = new MimeMessage();
我的应用程序的弹出窗口中有一个ajax样式的表单。我使用一个带有目标iframe的表单,然后在iframe.load()函数上,获取内容并将它们显示回弹出窗口。
这可以在IE9,Chrome,火狐上运行:
$("iframe[name=addpart-iframe]").load(function () {
//FF and IE fire the load when the popup first load, chrome does not. This kips the first onload where no submit has happene