public void CreateHost(ConfigHost host) { Host = new SmtpClient(host.Server, host.Port); Host.UseDefaultCredentials = false; Host.Credentials = new System.Net.NetworkCredential(host.Username, host.Password); Host.EnableSsl = host.EnableSsl; }
public UseNetMail(ConfigMail mail, ConfigHost host) { //构造函数,初始化对象 cMail = mail; cHost = host; }