+
diff --git a/BO/Web.config b/BO/Web.config
index 3768ba9..66525ac 100644
--- a/BO/Web.config
+++ b/BO/Web.config
@@ -33,7 +33,8 @@
-
+
+
diff --git a/Base/Controller/BasePartialController.cs b/Base/Controller/BasePartialController.cs
index 176d737..a231e3b 100644
--- a/Base/Controller/BasePartialController.cs
+++ b/Base/Controller/BasePartialController.cs
@@ -926,8 +926,8 @@ namespace NP.Base
mail.Body = Html.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
if (!string.IsNullOrEmpty(strFile))
{
- System.Net.Mail.Attachment attachment;//첨부파일 만들기
- attachment = new System.Net.Mail.Attachment(strFile);//첨부파일 붙이기
+ System.Web.Mail.MailAttachment attachment;//첨부파일 만들기
+ attachment = new System.Web.Mail.MailAttachment(strFile);//첨부파일 붙이기
mail.Attachments.Add(attachment);//첨부파일 붙이기
}
@@ -954,6 +954,7 @@ namespace NP.Base
}
return 1;
}
+
///
/// SendMailTemplate
///
@@ -966,6 +967,7 @@ namespace NP.Base
///
///
///
+ [Obsolete]
public int SendMailTemplate(string templateType, string sdEmail, string sdName, string rcvEmail, string title, string[] contents, string fileName, string bans = "")
{
var smtp = GetConfig("masteremail").Split(';');
@@ -976,12 +978,11 @@ namespace NP.Base
try
{
- System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
- mail.From = new System.Net.Mail.MailAddress(sdEmail, sdName, System.Text.Encoding.UTF8);
- mail.To.Add(rcvEmail);
+ MailMessage mail = new MailMessage();
+ mail.From = sdEmail;
+ mail.To =rcvEmail;
mail.Subject = title;
- mail.SubjectEncoding = System.Text.Encoding.UTF8;
- mail.IsBodyHtml = true;
+ mail.BodyFormat = MailFormat.Html;
mail.Body = string.Empty;
mail.BodyEncoding = System.Text.Encoding.UTF8;
@@ -1005,16 +1006,24 @@ namespace NP.Base
mail.Body = template_emailText.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
if (!string.IsNullOrEmpty(fileName))
{
- System.Net.Mail.Attachment attachment;
- attachment = new System.Net.Mail.Attachment(fileName);
+ System.Web.Mail.MailAttachment attachment;
+ attachment = new System.Web.Mail.MailAttachment(fileName);
mail.Attachments.Add(attachment);
}
- 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);
- }
+ 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", 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);
+ //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);
+ //}
//SmtpServer.Host = smtphost;
//SmtpServer.Port = Convert.ToInt32(smtpport);
//SmtpServer.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
diff --git a/FO/Web.config b/FO/Web.config
index e4f1bb5..140d682 100644
--- a/FO/Web.config
+++ b/FO/Web.config
@@ -33,7 +33,8 @@
-
+
+