();
+ traversedRows[row] = row;
+
+ global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
+ for (
+ ; ((parent != null)
+ && (traversedRows.ContainsKey(parent) == false));
+ ) {
+ distance = (distance + 1);
+ root = parent;
+ traversedRows[parent] = parent;
+ parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
+ }
+
+ if ((distance == 0)) {
+ traversedRows.Clear();
+ traversedRows[row] = row;
+ parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
+ for (
+ ; ((parent != null)
+ && (traversedRows.ContainsKey(parent) == false));
+ ) {
+ distance = (distance + 1);
+ root = parent;
+ traversedRows[parent] = parent;
+ parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
+ }
+ }
+
+ return root;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
+ public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
+ if (object.ReferenceEquals(row1, row2)) {
+ return 0;
+ }
+ if ((row1 == null)) {
+ return -1;
+ }
+ if ((row2 == null)) {
+ return 1;
+ }
+
+ int distance1 = 0;
+ global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
+
+ int distance2 = 0;
+ global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
+
+ if (object.ReferenceEquals(root1, root2)) {
+ return (this._childFirst * distance1.CompareTo(distance2));
+ }
+ else {
+ global::System.Diagnostics.Debug.Assert(((root1.Table != null)
+ && (root2.Table != null)));
+ if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
+ return -1;
+ }
+ else {
+ return 1;
+ }
+ }
+ }
+ }
+ }
+}
+
+#pragma warning restore 1591
\ No newline at end of file
diff --git a/MailManager/DataSet1.xsc b/MailManager/DataSet1.xsc
new file mode 100644
index 0000000..05b0199
--- /dev/null
+++ b/MailManager/DataSet1.xsc
@@ -0,0 +1,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/MailManager/DataSet1.xsd b/MailManager/DataSet1.xsd
new file mode 100644
index 0000000..840acbd
--- /dev/null
+++ b/MailManager/DataSet1.xsd
@@ -0,0 +1,714 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DELETE FROM [MailAuto] WHERE (([idx] = @Original_idx) AND ((@IsNull_enable = 1 AND [enable] IS NULL) OR ([enable] = @Original_enable)) AND ([fidx] = @Original_fidx) AND ([gcode] = @Original_gcode) AND ((@IsNull_sdate = 1 AND [sdate] IS NULL) OR ([sdate] = @Original_sdate)) AND ((@IsNull_edate = 1 AND [edate] IS NULL) OR ([edate] = @Original_edate)) AND ((@IsNull_stime = 1 AND [stime] IS NULL) OR ([stime] = @Original_stime)) AND ((@IsNull_sday = 1 AND [sday] IS NULL) OR ([sday] = @Original_sday)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [MailAuto] ([enable], [fidx], [gcode], [fromlist], [tolist], [bcc], [cc], [sdate], [edate], [stime], [sday], [wuid], [wdate], [subject], [body]) VALUES (@enable, @fidx, @gcode, @fromlist, @tolist, @bcc, @cc, @sdate, @edate, @stime, @sday, @wuid, @wdate, @subject, @body);
+SELECT idx, enable, fidx, gcode, fromlist, tolist, bcc, cc, sdate, edate, stime, sday, wuid, wdate, subject, body FROM MailAuto WHERE (idx = SCOPE_IDENTITY())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT idx, enable, fidx, gcode, fromlist, tolist, bcc, cc, sdate, edate, stime, sday, wuid, wdate, subject, body
+FROM MailAuto
+
+
+
+
+
+ UPDATE [MailAuto] SET [enable] = @enable, [fidx] = @fidx, [gcode] = @gcode, [fromlist] = @fromlist, [tolist] = @tolist, [bcc] = @bcc, [cc] = @cc, [sdate] = @sdate, [edate] = @edate, [stime] = @stime, [sday] = @sday, [wuid] = @wuid, [wdate] = @wdate, [subject] = @subject, [body] = @body WHERE (([idx] = @Original_idx) AND ((@IsNull_enable = 1 AND [enable] IS NULL) OR ([enable] = @Original_enable)) AND ([fidx] = @Original_fidx) AND ([gcode] = @Original_gcode) AND ((@IsNull_sdate = 1 AND [sdate] IS NULL) OR ([sdate] = @Original_sdate)) AND ((@IsNull_edate = 1 AND [edate] IS NULL) OR ([edate] = @Original_edate)) AND ((@IsNull_stime = 1 AND [stime] IS NULL) OR ([stime] = @Original_stime)) AND ((@IsNull_sday = 1 AND [sday] IS NULL) OR ([sday] = @Original_sday)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate));
+SELECT idx, enable, fidx, gcode, fromlist, tolist, bcc, cc, sdate, edate, stime, sday, wuid, wdate, subject, body FROM MailAuto WHERE (idx = @idx)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT idx, enable, fidx, gcode, fromlist, tolist, bcc, cc, sdate, edate, stime, sday, wuid, wdate, subject, body
+FROM MailAuto
+WHERE (enable = 1) AND (ISNULL(fromlist, '') <> '') AND (ISNULL(tolist, '') <> '') AND (ISNULL(stime, '') <> '')
+
+
+
+
+
+
+
+
+
+
+
+ DELETE FROM [MailData] WHERE (([idx] = @Original_idx) AND ((@IsNull_project = 1 AND [project] IS NULL) OR ([project] = @Original_project)) AND ([gcode] = @Original_gcode) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_pdate = 1 AND [pdate] IS NULL) OR ([pdate] = @Original_pdate)) AND ((@IsNull_SendOK = 1 AND [SendOK] IS NULL) OR ([SendOK] = @Original_SendOK)) AND ((@IsNull_SendMsg = 1 AND [SendMsg] IS NULL) OR ([SendMsg] = @Original_SendMsg)) AND ((@IsNull_aidx = 1 AND [aidx] IS NULL) OR ([aidx] = @Original_aidx)) AND ((@IsNull_atime = 1 AND [atime] IS NULL) OR ([atime] = @Original_atime)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [MailData] ([project], [gcode], [cate], [pdate], [subject], [tolist], [bcc], [cc], [body], [SendOK], [SendMsg], [aidx], [atime], [wuid], [wdate], [fromlist]) VALUES (@project, @gcode, @cate, @pdate, @subject, @tolist, @bcc, @cc, @body, @SendOK, @SendMsg, @aidx, @atime, @wuid, @wdate, @fromlist);
+SELECT idx, project, gcode, cate, pdate, subject, tolist, bcc, cc, body, SendOK, SendMsg, aidx, atime, wuid, wdate, fromlist FROM MailData WHERE (idx = SCOPE_IDENTITY())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT idx, project, gcode, cate, pdate, subject, tolist, bcc, cc, body, SendOK, SendMsg, aidx, atime, wuid, wdate, fromlist
+FROM MailData
+WHERE (ISNULL(SendOK, 0) = 0)
+
+
+
+
+
+ UPDATE [MailData] SET [project] = @project, [gcode] = @gcode, [cate] = @cate, [pdate] = @pdate, [subject] = @subject, [tolist] = @tolist, [bcc] = @bcc, [cc] = @cc, [body] = @body, [SendOK] = @SendOK, [SendMsg] = @SendMsg, [aidx] = @aidx, [atime] = @atime, [wuid] = @wuid, [wdate] = @wdate, [fromlist] = @fromlist WHERE (([idx] = @Original_idx) AND ((@IsNull_project = 1 AND [project] IS NULL) OR ([project] = @Original_project)) AND ([gcode] = @Original_gcode) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_pdate = 1 AND [pdate] IS NULL) OR ([pdate] = @Original_pdate)) AND ((@IsNull_SendOK = 1 AND [SendOK] IS NULL) OR ([SendOK] = @Original_SendOK)) AND ((@IsNull_SendMsg = 1 AND [SendMsg] IS NULL) OR ([SendMsg] = @Original_SendMsg)) AND ((@IsNull_aidx = 1 AND [aidx] IS NULL) OR ([aidx] = @Original_aidx)) AND ((@IsNull_atime = 1 AND [atime] IS NULL) OR ([atime] = @Original_atime)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate));
+SELECT idx, project, gcode, cate, pdate, subject, tolist, bcc, cc, body, SendOK, SendMsg, aidx, atime, wuid, wdate, fromlist FROM MailData WHERE (idx = @idx)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT COUNT(*) AS Expr1
+FROM MailData
+WHERE (aidx = @aidx) AND (pdate = @pdate) AND (atime = @atime) AND (cate = @cate)
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT COUNT(*) as cnt
+FROM MailData
+WHERE aidx=@aidx and atime=@atime and pdate=@pdate and cate=@cate
+
+
+
+
+
+
+
+
+
+
+
+
+ UPDATE MailData
+SET SendOK = 1, SendMsg = @msg
+WHERE (idx = @idx)
+
+
+
+
+
+
+
+
+ UPDATE [MailData] SET SendOK = 1
+WHERE (idx = @idx)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DELETE FROM [MailForm] WHERE (([idx] = @Original_idx) AND ([gcode] = @Original_gcode) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)) AND ((@IsNull_selfTo = 1 AND [selfTo] IS NULL) OR ([selfTo] = @Original_selfTo)) AND ((@IsNull_selfCC = 1 AND [selfCC] IS NULL) OR ([selfCC] = @Original_selfCC)) AND ((@IsNull_selfBCC = 1 AND [selfBCC] IS NULL) OR ([selfBCC] = @Original_selfBCC)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO [MailForm] ([gcode], [cate], [title], [tolist], [bcc], [cc], [subject], [tail], [body], [selfTo], [selfCC], [selfBCC], [wuid], [wdate]) VALUES (@gcode, @cate, @title, @tolist, @bcc, @cc, @subject, @tail, @body, @selfTo, @selfCC, @selfBCC, @wuid, @wdate);
+SELECT idx, gcode, cate, title, tolist, bcc, cc, subject, tail, body, selfTo, selfCC, selfBCC, wuid, wdate FROM MailForm WHERE (idx = SCOPE_IDENTITY())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT MailForm.*
+FROM MailForm
+
+
+
+
+
+ UPDATE [MailForm] SET [gcode] = @gcode, [cate] = @cate, [title] = @title, [tolist] = @tolist, [bcc] = @bcc, [cc] = @cc, [subject] = @subject, [tail] = @tail, [body] = @body, [selfTo] = @selfTo, [selfCC] = @selfCC, [selfBCC] = @selfBCC, [wuid] = @wuid, [wdate] = @wdate WHERE (([idx] = @Original_idx) AND ([gcode] = @Original_gcode) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_title = 1 AND [title] IS NULL) OR ([title] = @Original_title)) AND ((@IsNull_selfTo = 1 AND [selfTo] IS NULL) OR ([selfTo] = @Original_selfTo)) AND ((@IsNull_selfCC = 1 AND [selfCC] IS NULL) OR ([selfCC] = @Original_selfCC)) AND ((@IsNull_selfBCC = 1 AND [selfBCC] IS NULL) OR ([selfBCC] = @Original_selfBCC)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate));
+SELECT idx, gcode, cate, title, tolist, bcc, cc, subject, tail, body, selfTo, selfCC, selfBCC, wuid, wdate FROM MailForm WHERE (idx = @idx)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MailManager/DataSet1.xss b/MailManager/DataSet1.xss
new file mode 100644
index 0000000..2cfce25
--- /dev/null
+++ b/MailManager/DataSet1.xss
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MailManager/MailManager.csproj b/MailManager/MailManager.csproj
new file mode 100644
index 0000000..481d795
--- /dev/null
+++ b/MailManager/MailManager.csproj
@@ -0,0 +1,83 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {0D8E0019-909A-4879-9088-B2927509264E}
+ Exe
+ Properties
+ MailManager
+ MailManager
+ v4.0
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ DataSet1.xsd
+
+
+
+
+ True
+ True
+ Settings.settings
+
+
+
+
+
+ DataSet1.xsd
+
+
+ Designer
+ MSDataSetGenerator
+ DataSet1.Designer.cs
+
+
+ DataSet1.xsd
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
\ No newline at end of file
diff --git a/MailManager/Program.cs b/MailManager/Program.cs
new file mode 100644
index 0000000..0d4ec92
--- /dev/null
+++ b/MailManager/Program.cs
@@ -0,0 +1,229 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data.SqlClient;
+
+namespace MailManager
+{
+ class Program
+ {
+
+ static DateTime ChkAutoDate = DateTime.Now.AddDays(-1);
+ static void Main(string[] args)
+ {
+ //먼저 보낼 메일이 있다면 전송을 한다
+
+ while (true)
+ {
+
+ try
+ {
+
+ SendMail();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("send error:" + ex.Message);
+ }
+
+ System.Threading.Thread.Sleep(1000);
+
+ try
+ {
+
+ MakeAutoMail();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("MakeAutoMail error:" + ex.Message);
+ }
+
+ System.Threading.Thread.Sleep(1000);
+ }
+ }
+
+ static void SendMail()
+ {
+ Console.WriteLine("Check Send Mail Data");
+ var ta = new DataSet1TableAdapters.MailDataTableAdapter();
+ var sendList = ta.GetData(); //발송되지않은 메일목록
+
+ if (sendList.Rows.Count > 0) Console.WriteLine("Found : " + sendList.Rows.Count.ToString());
+
+ foreach (DataSet1.MailDataRow dr in sendList)
+ {
+ //전자메일 검증을 한다.
+ var list_from = getMaillist(dr.fromlist);
+ var list_to = getMaillist(dr.tolist);
+ var list_bcc = getMaillist(dr.bcc);
+ var list_cc = getMaillist(dr.cc);
+
+
+ string sendMsg = "";
+ if (list_from == "")
+ {
+ sendMsg = ("보내는 주소가 없습니다");
+ }
+ else if (dr.subject.Trim() == "")
+ {
+ sendMsg = ("메일 제목이 없습니다");
+ }
+ else if (dr.body.Trim() == "")
+ {
+ sendMsg = ("본문이 없습니다");
+ }
+ else if (list_to == "")
+ {
+ sendMsg = ("받는 주소가 없습니다");
+ }
+ else
+ {
+
+ var body = dr.body;
+ body +=
+ "" +
+ "
이 메일은 EET 프로그램에서 자동 발신 되었습니다." +
+ "
메일이 잘못 전송 되었다면 [chikyun.kim@amkor.co.kr] 로 문의 주시기 바랍니다" +
+ "
";
+
+
+ //전송을 해야 함
+ var mc = new System.Net.Mail.SmtpClient("10.101.10.6");
+ var msg = new System.Net.Mail.MailMessage
+ (list_from,
+ list_to,
+ dr.subject,
+ body);
+
+
+ if (list_bcc != "") msg.Bcc.Add(list_bcc);
+ if (list_cc != "") msg.CC.Add(list_cc);
+ msg.IsBodyHtml = true;
+
+ try
+ {
+ mc.Send(msg);
+ Console.WriteLine("send mail to" + list_to + ",subject=" + dr.subject);
+ sendMsg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+ }
+ catch (Exception eX)
+ {
+ sendMsg = eX.Message;
+ }
+ }
+
+ Console.WriteLine(string.Format("Send Complete index={0},Msg={1}", dr.idx, sendMsg));
+ ta.UpdateSendOK(sendMsg, dr.idx);
+ break;
+ }
+
+ }
+
+ static void MakeAutoMail()
+ {
+ var ts = DateTime.Now - ChkAutoDate;
+ if (ts.TotalMinutes < 1) return; //10분마다 자동 생성 데이터를 처리한다
+ Console.WriteLine("Check Auto Make Mail");
+
+ var taData = new DataSet1TableAdapters.MailDataTableAdapter();
+ var taList = new DataSet1TableAdapters.MailAutoTableAdapter();
+ var dtList = taList.GetByAutoSend();
+ var dtInsert = new DataSet1.MailDataDataTable();
+
+ //대상
+ Console.WriteLine("Make Auto Send Mail Data (" + dtList.Rows.Count.ToString() + ")");
+
+ foreach (DataSet1.MailAutoRow dr in dtList)
+ {
+ //시간정보가 없는 애들은 처리 하지 않음
+ if (dr.stime.IndexOf(":") == -1) continue;
+ if (dr.sday == null || dr.sday.Length < 2) continue;
+
+ //발신시간을 넘어야 한다
+ var curTime = DateTime.Now.ToString("HH:mm");
+ if (string.Compare(curTime, dr.stime) < 0) continue; //지정된 시간 이전이면 생성 안한다
+
+ //자동생성 구분용 카테고리
+ var cate = string.Format("{0},{1}", dr.sday[0], dr.sday[1]);
+
+ //동륵일
+ var pdate = DateTime.Now.ToString("yyyy-MM-dd");
+
+ //같은날, 같은 atime aidx pdate 의 같이 있으면 이미 생성된것이므로 추가하지 않는다
+ var existData = taData.FindAutoData(dr.idx, dr.stime, pdate, cate);
+ var PreMakeCount = (int)(existData);
+ if (PreMakeCount > 0) continue;
+
+ //전송간격과 대상
+ if (dr.sday[0] == 1)
+ {
+ //week
+ var bitString = Convert.ToString(dr.sday[1], 2).PadLeft(8, '0').ToArray();
+ var weeknum = (int)(DateTime.Now.DayOfWeek);
+ if (bitString[weeknum + 1] == '0') continue;
+ }
+ else
+ {
+ //month
+ if (dr.sday[1] != DateTime.Now.Day) continue;
+ }
+
+
+
+ //같은날, 같은 atime aidx pdate 의 같이 있으면 이미 생성된것이므로 추가하지 않는다
+ //생성해야할 자료라면 만들어 준다
+ var newdr = dtInsert.NewMailDataRow();
+ newdr.pdate = pdate;// DateTime.Now.ToString("yyyy-MM-dd");
+ newdr.gcode = dr.gcode;
+ newdr.fromlist = dr.fromlist;
+ newdr.tolist = dr.tolist;
+ newdr.bcc = dr.bcc;
+ newdr.cate = cate;// string.Format("{0},{1}", dr.sday[0], dr.sday[1]); //cate에 해당 자료를 기록한다.
+ newdr.cc = dr.cc;
+ newdr.subject = dr.subject;
+ newdr.body = dr.body;
+ newdr.aidx = dr.idx;
+ newdr.atime = dr.stime;
+ newdr.wuid = "MANAGER";
+ newdr.wdate = DateTime.Now;
+ dtInsert.AddMailDataRow(newdr);
+ try
+ {
+ taData.Update(newdr);
+ Console.WriteLine("auto make : " + newdr.tolist + ",subject=" + newdr.subject);
+ }
+ catch (Exception eX)
+ {
+ Console.WriteLine("auto make error : " + eX.Message);
+ }
+ }
+ ChkAutoDate = DateTime.Now;
+ }
+
+ static string getMaillist(string org)
+ {
+ org = org.Replace(";", ",").Replace(":", ",");
+ string list_to = "";
+ foreach (var item in org.Split(','))
+ {
+ if (item.Trim() != "")
+ {
+ var atindex = item.IndexOf("@");
+ if (atindex != -1)
+ {
+ var dotindex = item.IndexOf(".", atindex + 1);
+ if (dotindex != -1)
+ {
+ //정상이므로 추가한다.
+ if (list_to != "") list_to += ",";
+ list_to += item.Trim();
+ }
+ }
+ }
+ }
+ return list_to;
+ }
+
+ }
+}
diff --git a/MailManager/Properties/AssemblyInfo.cs b/MailManager/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..c401209
--- /dev/null
+++ b/MailManager/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다.
+// 어셈블리와 관련된 정보를 수정하려면
+// 이 특성 값을 변경하십시오.
+[assembly: AssemblyTitle("MailManager")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MailManager")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
+// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
+// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오.
+[assembly: ComVisible(false)]
+
+// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
+[assembly: Guid("ba61bd46-8ea2-46c9-a4ec-7adf2feb75b0")]
+
+// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
+//
+// 주 버전
+// 부 버전
+// 빌드 번호
+// 수정 버전
+//
+// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로
+// 지정되도록 할 수 있습니다.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("19.10.01.1400")]
+[assembly: AssemblyFileVersion("19.10.01.1400")]
diff --git a/MailManager/Properties/Settings.Designer.cs b/MailManager/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..d18c7f9
--- /dev/null
+++ b/MailManager/Properties/Settings.Designer.cs
@@ -0,0 +1,48 @@
+//------------------------------------------------------------------------------
+//
+// 이 코드는 도구를 사용하여 생성되었습니다.
+// 런타임 버전:4.0.30319.42000
+//
+// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
+// 이러한 변경 내용이 손실됩니다.
+//
+//------------------------------------------------------------------------------
+
+namespace MailManager.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
+ [global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=ee" +
+ "user;Password=EEmicro123!")]
+ public string gwcs {
+ get {
+ return ((string)(this["gwcs"]));
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
+ [global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=ee" +
+ "user;Password=EEmicro123!")]
+ public string CS {
+ get {
+ return ((string)(this["CS"]));
+ }
+ }
+ }
+}
diff --git a/MailManager/Properties/Settings.settings b/MailManager/Properties/Settings.settings
new file mode 100644
index 0000000..57170f7
--- /dev/null
+++ b/MailManager/Properties/Settings.settings
@@ -0,0 +1,21 @@
+
+
+
+
+
+ <?xml version="1.0" encoding="utf-16"?>
+<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <ConnectionString>Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=EEmicro123!</ConnectionString>
+</SerializableConnectionString>
+ Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=EEmicro123!
+
+
+ <?xml version="1.0" encoding="utf-16"?>
+<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <ConnectionString>Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=EEmicro123!</ConnectionString>
+ <ProviderName>System.Data.SqlClient</ProviderName>
+</SerializableConnectionString>
+ Data Source=10.131.15.18;Initial Catalog=EE;Persist Security Info=True;User ID=eeuser;Password=EEmicro123!
+
+
+
\ No newline at end of file
diff --git a/MailManager/app.config b/MailManager/app.config
new file mode 100644
index 0000000..e78b0ea
--- /dev/null
+++ b/MailManager/app.config
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file