示例#1
0
 public void Send(string body)
 {
     ForEachInfo((info) =>
     {
         info.Body = body;
         MailUtility.Send(mailConfig, info);
     });
 }
示例#2
0
        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);
        }