public void Send(string body) { ForEachInfo((info) => { info.Body = body; MailUtility.Send(mailConfig, info); }); }
public IAsyncMail SendAsync(string body) { var mail = new AsyncMail(); ForEachInfo((info) => { info.Body = body; var asyn = MailUtility.SendAsync(mailConfig, info); mail.RecordSubMail(asyn); asyn.onComplete = mail.OnSubMailComplete; }); return(mail); }