This commit is contained in:
chi
2023-04-28 16:13:40 +09:00
parent 79ea4ddfff
commit 354c6a5e1b
13 changed files with 459 additions and 283 deletions

View File

@@ -188,9 +188,31 @@ namespace Project
{
sendMsg = ("받는 주소가 없습니다");
}
if (sendMsg.isEmpty()==false)
{
//오류가 있다
try
{
cmd.CommandText = "UPDATE MailData SET SendOK = 1, SendMsg = @msg WHERE(idx = @idx) and isnull(sendok,0) = 0";
cmd.Parameters.Clear();
cmd.Parameters.Add("msg", System.Data.SqlDbType.VarChar).Value = sendMsg;
cmd.Parameters.Add("idx", System.Data.SqlDbType.Int).Value = idx;
//Console.WriteLine(string.Format("Send Complete index={0},Msg={1}", dar["idx"], sendMsg));
//ta.UpdateSendOK(sendMsg, dr.idx);
var ucnt = cmd.ExecuteNonQuery();
if (ucnt == 1)
{
Console.WriteLine("send mail to" + list_to + ",subject=" + getdbdata(subject));
}
}
catch (Exception eX)
{
sendMsg = eX.Message;
}
}
else
{
//var body = getdbdata(dar["body"]);
body +=
"<p>" +
@@ -248,12 +270,9 @@ namespace Project
//sendMsg = eX.Message;
//msgupdate = true;
}
}
cmd.Dispose();
cn.Close();
}