SoftMail 构造函数 |
命名空间: HslCommunication.BasicFramework
public SoftMail( Action<SmtpClient> mailIni, string addr_From = "", string addr_to = "" )
/// <summary> /// 系统提供一个默认的163邮箱发送账号,只要更改接收地址即可发送服务,可能会被拦截 /// </summary> public static SoftMail MailSystem163 = new SoftMail( mail => { mail.Host = "smtp.163.com";//使用163的SMTP服务器发送邮件 mail.UseDefaultCredentials = true; mail.EnableSsl = true; mail.Port = 25; mail.DeliveryMethod = SmtpDeliveryMethod.Network; mail.Credentials = new System.Net.NetworkCredential("softmailsendcenter", "zxcvbnm6789");//密码zxcvbnm1234 }, "softmailsendcenter@163.com", "hsl200909@163.com" ); /// <summary> /// 系统提供一个默认的QQ邮箱发送账号,只要更改接收地址即可发送服务,发送成功概率比较高 /// </summary> public static SoftMail MailSystemQQ = new SoftMail( mail => { mail.Host = "smtp.qq.com";//使用QQ的SMTP服务器发送邮件 mail.UseDefaultCredentials = true; mail.Port = 587; mail.EnableSsl = true; mail.DeliveryMethod = SmtpDeliveryMethod.Network; mail.Credentials = new System.Net.NetworkCredential("974856779", "tvnlczxdumutbbic");//密码tvnlczxdumutbbic }, "974856779@qq.com", "hsl200909@163.com" );