@page @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Mvc @using ZoomLa.Model.SYS @using ZoomLa.BLL.Helper @model PageModel @functions{ public class PageModel : Page_Base { public M_EMail_Item email = new M_EMail_Item(); public IActionResult OnGet() { email.ToAddress = GetParam("email"); email.Subject = HttpUtility.UrlDecode(GetParam("t")); email.MailBody = HttpUtility.UrlDecode(GetParam("c")); return Page(); } public IActionResult OnPost() { return Content(Success.ToString()); } public IActionResult OnPostSave() { M_EMail_Item mailMod = new M_EMail_Item(); mailMod.Subject = GetParam("Subject"); mailMod.FromName = GetParam("formName"); mailMod.MailBody = GetParam("MailBody"); mailMod.ToAddress = GetParam("ToAddress"); ZoomLa.BLL.SYS.B_EMailHelper.SendAsync(mailMod);//自动将mailMod写入数据库 return Redirect("MailSend?r=1"); } } } @{ Layout = "_empty"; } @section head{
邮件已成功发送