i am trying to send mail through check boxes and i done it but here i want when admin click on check boxes and press on button then admin get the value of document name and status from repeater and then send mail to user
like when admin send mail in any email id then it show like this when user receive mail document name: abc status: reject
this is email button code
protected void btnSendMail_Click(object sender, EventArgs e) { string connStr = ConfigurationManager.ConnectionStrings["mydms"].ConnectionString; SqlConnection mySQLconnection = new SqlConnection(connStr); string empId = string.Empty; DataTable dt = new DataTable(); try { mySQLconnection.Open(); for (int i = 0; i < Repeateremail.Items.Count; i++) { CheckBox checkboc = ((CheckBox)Repeateremail.Items[i].FindControl("chkSelect")); if (checkboc != null) { if (checkboc.Checked == true) { //get Current EMAIL_ID from the DataKey string emailId = ((Label)Repeateremail.Items[i].FindControl("lbl_email")).Text; //write code to send mail SendEmailUsingGmail(emailId); dt.Clear(); dt.Dispose(); } else if (checkboc.Checked == false) { } } } } catch (Exception ex) { emailsent.Text="Failed"; } finally { empId = string.Empty; } }
from below table i get the value of document name and status ..when admin click on button then from row both values also get and send it to mail ..like user reeive mail
document name : abc status : reject
this above info what i want in email when user receive mail then this above info user able to see in email
DocID DocName Uplaodedfile UserEmail DocType DepType status 1 ABC def.pdf abcdef@gmail.com pdf hr reject 2 hr hrdoc.pdf johkety@gmail.com pdf hr approve