电话
13363039260
邮箱发送方法:
PageAdmin.Common.EmailHelper.SendEmail(string mailTo, string mailSubject, string mailBody,string mailReply = null,string mailCC = null, IEnumerable<string> attachments = null)
参数说明:
mailTo:收件地址
mailSubject:邮件主题
mailBody:邮件内容
mailReply:回复邮箱,选填参数
mailCC:抄送邮箱,选填参数
attachments:附件列表,采用本地文件路径,选填参数
自定义页面使用演示:
@{ Layout = null;//禁止加载母版页 List<string> attachments=new List<string>(); attachments.Add("/upload/test.jpg"); var tipsInfo = PageAdmin.Common.EmailHelper.SendEmail("qq@qq.com","邮件标题","邮件内容","回复邮箱","抄送邮箱",attachments); //向浏览器输出发送结果,前台ajax可以在回调中获取到结果 Response.Clear(); Response.ContentType = "application/json"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(JsonHelper.JsonParse(tipsInfo)); Response.End(); }
注意:需要在系统设置>>邮件发送设置中设置好邮件发送参数