private string GetMessage(string name, Models.EmailInfo model) { return($"[{IPUtils.GetLocalIp()}]" + $"通过【{name}】邮件接口向【{model.Email}】发送邮件," + $"标题: {model.Title}," + $"内容:{model.Body}"); }
public string Send_Google(Models.EmailInfo model) { return(this.GetMessage("Google", model)); }
public string Send_QQ(Models.EmailInfo model) { return(this.GetMessage("QQ", model)); }
public string Send_Outlook(Models.EmailInfo model) { return(this.GetMessage("Outlook", model)); }
public IActionResult OnGet(int?id) { EmailInfo = _context.EmailInfo.FirstOrDefault(ei => ei.Id == id); return(Page()); }