Esempio n. 1
0
        public void Send(string from, string to, string subject, string body, string[] cc = null, string[] files = null, bool isBodyHtml = true)
        {
            var mail = new MailInfo(from, to, subject, body, isBodyHtml)
            {
                CC = cc, AttachmentFile = files
            };

            SendEmail(mail);
        }
Esempio n. 2
0
        public Task SendAsync(string from, string to, string subject, string body, string[] cc, string[] files, bool isBodyHtml = true)
        {
            var mail = new MailInfo(from, to, subject, body, isBodyHtml)
            {
                CC = cc, AttachmentFile = files
            };

            //NormalizeMail(mail);
            return(SendEmailAsync(mail));
        }
Esempio n. 3
0
 /// <summary>
 /// 发送一封邮件
 /// </summary>
 /// <param name="mail"></param>
 protected abstract void SendEmail(MailInfo mail);
Esempio n. 4
0
 /// <summary>
 /// 发送邮件
 /// </summary>
 /// <param name="mail"></param>
 /// <returns></returns>
 protected abstract Task SendEmailAsync(MailInfo mail);