lbldate.Text = datetime mydate.Tostring(); public void emailSend() { DataTable dtemplogin = new DataTable(); dtemplogin = _login.SelectEmpLogin(); DataTable dtptIns = new DataTable(); dtptIns = _login.selectPatientInsurance(); Connection.DataSource = ConfigurationManager.AppSettings["DataSource"].ToString(); Connection.Uid = ConfigurationManager.AppSettings["uid"].ToString(); Connection.Pwd = ConfigurationManager.AppSettings["pwd"].ToString(); Connection.Initialcatalog = ConfigurationManager.AppSettings["InitialCatalog"].ToString(); MailMsg.mailSend(); MailMsg.CcAddress = string.Empty; MailMsg.BccAddress = string.Empty; MailMsg.Attachments = null; MailMsg.Subject = "insurance Expiry alert message"; MailMsg.FromAddress = "radha@rediffmail.com"; MailMsg.ToAddress = txtEmailID.Text; MailMsg.Password = "hhahshd"; MailMsg.MessageBody += "<html>"; MailMsg.MessageBody += "<head>"; MailMsg.MessageBody += "<title>Insurance is going To expiry on:</title>"; MailMsg.MessageBody += "</head>"; MailMsg.MessageBody += "<body>"; MailMsg.MessageBody += dtptIns.Rows[1]["F_Name"].ToString(); MailMsg.MessageBody += dtptIns.Rows[5]["Ins_Name"].ToString(); MailMsg.MessageBody += dtptIns.Rows[6]["Effective_Date_From"].ToString(); MailMsg.MessageBody += dtptIns.Rows[7]["Effective_Date_To"].ToString(); MailMsg.MessageBody += "</body>"; MailMsg.MessageBody += "</html>"; }
Thread
emailsend
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)