public void Send() { var emailServer = new EmailServer(); foreach (var message in _pendings) { emailServer.Send(message); } }
public void Send() { var emailServer = new EmailServer(); _pendings.AsParallel().ForAll(m => { emailServer.Send(m); SendCompleted?.Invoke(this, m); }); }
public static bool SendUpdateEmailVerificateEmail(string email, string verify_code) { EmailServer server = new EmailServer(); string body = System.IO.File.ReadAllText(@"template\verify_email_source.html"); body = body.Replace("{$$-USER_VERIFY_CODE-$$}", verify_code); body = body.Replace("{$$-USER_EMAIL_REASON-$$}", "更改绑定邮箱时产生"); body = body.Replace("{$$-USER_EMAIL_REMINDER-$$}", "在进行用户邮箱绑定修改的关键过程中"); return(server.Send(email, "KXT令牌", body)); }