This commit is contained in:
chi
2025-04-18 09:26:39 +09:00
parent 66ef51f814
commit 930e09400d
15 changed files with 282 additions and 206 deletions

View File

@@ -46,5 +46,17 @@ namespace Project.Properties {
return ((string)(this["CS"]));
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10.101.5.150")]
public string mailserver {
get {
return ((string)(this["mailserver"]));
}
set {
this["mailserver"] = value;
}
}
}
}

View File

@@ -18,5 +18,8 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&amp;DJ+ug-D;Encrypt=False;TrustServerCertificate=True</Value>
</Setting>
<Setting Name="mailserver" Type="System.String" Scope="User">
<Value Profile="(Default)">10.101.5.150</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -36,6 +36,7 @@ namespace Project
System.IO.Directory.CreateDirectory(FCOMMON.info.Path);
}
FCOMMON.info.CS = Properties.Settings.Default.gwcs;
FCOMMON.info.mailserver = Properties.Settings.Default.mailserver;
//setting
setting = new Setting(FCOMMON.info.Path.MakeFilePath("Setting", "Setting.xml"));

View File

@@ -71,7 +71,7 @@ namespace Project
while (bBW)
{
ServerUtil.IsMailserver = ServerUtil.SendmailSet();
if (ServerUtil.IsMailserver && System.Diagnostics.Debugger.IsAttached == false)
if (ServerUtil.IsMailserver)
{
//메일대기내역전송
var tsSendMail = DateTime.Now - ChkSendMailTime;

View File

@@ -200,7 +200,7 @@ namespace Project
newdr.gcode = "EET1P";
newdr.cate = "ERR";
newdr.subject = $"[GW] {vGcode} - 업무일지 담당자 이메일 경고";
newdr.fromlist = "chikyun.kim@amkor.co.kr";
newdr.fromlist = "gw@amkor.co.kr";
newdr.tolist = "chikyun.kim@amkor.co.kr";
newdr.bcc = string.Empty;
newdr.cc = string.Empty;
@@ -961,10 +961,11 @@ namespace Project
{
var cn = new System.Data.SqlClient.SqlConnection(Properties.Settings.Default.gwcs);
var cmd = new System.Data.SqlClient.SqlCommand("", cn);
var gcode = FCOMMON.info.Login.gcode;
cn.Open();
//1개의데이터 가져오기
cmd.CommandText = "SELECT top 1 * FROM MailData WHERE ISNULL(SendOK, 0) = 0 order by wdate";
cmd.CommandText = $"SELECT top 1 * FROM MailData WHERE ISNULL(SendOK, 0) = 0 order by wdate";
var dar = cmd.ExecuteReader();
var list_from = string.Empty;// getMaillist(dar["fromlist"]);
@@ -1044,7 +1045,7 @@ namespace Project
"</p>";
//전송을 해야 함
var mc = new System.Net.Mail.SmtpClient("10.101.5.150");
var mc = new System.Net.Mail.SmtpClient(FCOMMON.info.mailserver);
var msg = new System.Net.Mail.MailMessage
(list_from,
list_to,

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections></configSections>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Project.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="Project.Properties.Settings.gwcs" connectionString="Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&amp;DJ+ug-D;Encrypt=False;TrustServerCertificate=True"
providerName="System.Data.SqlClient" />
@@ -90,4 +94,11 @@
<bindings />
<client />
</system.serviceModel>
<userSettings>
<Project.Properties.Settings>
<setting name="mailserver" serializeAs="String">
<value>10.101.5.150</value>
</setting>
</Project.Properties.Settings>
</userSettings>
</configuration>