diff --git a/Base/Controller/BasePartialController.cs b/Base/Controller/BasePartialController.cs index 1ad403f..3e70ade 100644 --- a/Base/Controller/BasePartialController.cs +++ b/Base/Controller/BasePartialController.cs @@ -1069,48 +1069,54 @@ namespace NP.Base /// /// /// - [Obsolete] + [Obsolete] protected int SendEmail(String smtphost, int smtpport, String smtpid, String smtppw, int SendType, String rcvEmail, String sdEmail, String sdName, String title, String Html, String strFile = null, string bans = "") { - + System.Web.Mail.MailMessage mail = null; switch (SendType) { case 1: break; - default: break; - } + default: + break; + } String result = rcvEmail; try { - var mail = new System.Web.Mail.MailMessage(); + mail = new System.Web.Mail.MailMessage(); mail.Subject = title; - mail.From = "donetreplay@cte.or.kr"; // sdEmail; //보내는 사람 설정 - mail.To = rcvEmail; // 받는 사람 설정 + mail.From = sdEmail; //보내는 사람 설정 + mail.To = rcvEmail; // 받는 사람 설정 mail.BodyEncoding = System.Text.Encoding.UTF8; mail.BodyFormat = MailFormat.Html; - if ("" != bans) { Html = Html.Replace("^ban0^", bans.Split(':')[0]).Replace("^ban1^", bans.Split(':')[1]); } - var files = new NP.Model.VMBase() { }; mail.Body = Html.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor"); - if (!string.IsNullOrEmpty(strFile)) { System.Web.Mail.MailAttachment attachment;//첨부파일 만들기 attachment = new System.Web.Mail.MailAttachment(strFile);//첨부파일 붙이기 mail.Attachments.Add(attachment);//첨부파일 붙이기 } - + + int cdoBasic = 1; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", true); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", smtpport); - mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1); + mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpid); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw); SmtpMail.SmtpServer = smtphost; - SmtpMail.Send(mail); + SmtpMail.Send(mail); + + //using (System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient(smtphost, smtpport)) + //{ + // SmtpServer.Credentials = new System.Net.NetworkCredential(smtpid, smtppw); + // //SmtpServer.EnableSsl = true; + // SmtpServer.Send(mail); + //} } catch (Exception ex) { diff --git a/FO/Views/CRoom/Estimation.cshtml b/FO/Views/CRoom/Estimation.cshtml index 3e26c60..ad53b29 100644 --- a/FO/Views/CRoom/Estimation.cshtml +++ b/FO/Views/CRoom/Estimation.cshtml @@ -15,14 +15,18 @@ .SingleOrDefault(); // 예외처리 과정코드들? - List allowLectNos = Array - .ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse) - .ToList(); + //List allowLectNos = Array + // .ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse) + // .ToList(); + //ViewBag.exCheck = allowLectNos.IndexOf(Model.croomlectno) > -1 ? true : false; // 현재 진도율 int currentProgresRate = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval5; + // 시험응시가능여부 + bool isExCheck = ViewBag.exCheck != null ? (bool)ViewBag.exCheck : false; + }