예제 #1
0
파일: Email.cs 프로젝트: sumdood31/DIYFE
        public static SendEmailResult SendEmail(System.Net.Mail.MailMessage message)
        {
            message.BodyEncoding = Encoding.UTF8;
            message.IsBodyHtml = true;
            SmtpClient mailClient = new SmtpClient();

            var log = new SendEmailResult() { Message = message };
            try
            {
                mailClient.Send(message);
            }
            catch (Exception ex)
            {
                log.Exception = ex;
                MVC4Template.Models.ErrorModel err = new MVC4Template.Models.ErrorModel();
                err.InsertErrorNoMail(ex);
            }

            return log;
        }
예제 #2
0
파일: Email.cs 프로젝트: GokitaU/DIYFE
        public static SendEmailResult SendEmail(System.Net.Mail.MailMessage message)
        {
            message.BodyEncoding = Encoding.UTF8;
            message.IsBodyHtml   = true;
            SmtpClient mailClient = new SmtpClient();

            var log = new SendEmailResult()
            {
                Message = message
            };

            try
            {
                mailClient.Send(message);
            }
            catch (Exception ex)
            {
                log.Exception = ex;
                MVC4Template.Models.ErrorModel err = new MVC4Template.Models.ErrorModel();
                err.InsertErrorNoMail(ex);
            }

            return(log);
        }