void Send_mail() { Load_Emp_Details(); StringBuilder strBody = new StringBuilder(); strBody.Append("<table><tr><td><span style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana'>Dear User " + lblusername.Text + ",</span></td></tr>"); strBody.Append("<tr><td colspan=2> </tr>"); strBody.Append("<tr><td><span style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana'>New Request Generated :-</span></td></tr>"); strBody.Append("<tr><td colspan=2><table width='500 px' id=tab1e border=1 style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana' cellSpacing=0 cellPadding=-1>"); strBody.Append("<tr><td bgcolor='#8CC3F7' style='width:100px'> Request No. </td><td Align='Center' style='width:10px'>:</td><td Align='Left' style='width:400px'>" + lblrequestid.Text + "</td></tr> "); strBody.Append("<tr><td bgcolor='#8CC3F7'style='width:100px'> Requested By </td><td Align='Center' style='width:10px'>:</td><td Align='Left' style='width:400px'>" + lblusername.Text + " " + Session["LastName"] + "</td></tr>"); strBody.Append("<tr><td bgcolor='#8CC3F7' style='width:100px'> Request Title </td><td Align='Center' style='width:10px'>:</td><td Align='Left' style='width:400px'>" + txtrequesttitle.Text + "</td></tr>"); strBody.Append("<tr><td bgcolor='#8CC3F7' style='width:100px'> Description </td><td Align='Center' style='width:10px'>:</td><td align='Left' style='width:400px'>" + txtshortdescription.Text + "</td></tr>"); strBody.Append("<tr><td bgcolor='#8CC3F7' style='width:100px'> Reason for change </td><td Align='Center' style='width:10px'>:</td><td Align='Left' style='width:400px'>" + txtreasonforchange.Text + "</td></tr>"); strBody.Append("</table></td></tr>"); strBody.Append("<tr><td colspan=2> </tr>"); strBody.Append("<tr><td colspan=2> </tr>"); strBody.Append("<tr><td colspan=2><span style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana'>Thanks & Regards,</span></td></tr>"); strBody.Append("<tr><td colspan=2><span style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana'>Software Team</span></td></tr>"); strBody.Append("<tr><td colspan=2></tr>"); strBody.Append("<tr><td colspan=2><span style='FONT-SIZE: 10pt; FONT-FAMILY: Verdana'>Note:- Please do not reply to the mail, this is a system auto generated mail."); strBody.Append("</span></td></tr></table>"); string maillist = ""; maillist = lbluseremail.Text; //+ ";" + lblreportingemail.Text; ClsSendMail.Send_Mail_Direct(maillist.ToString(), strBody.ToString(), "New Software Request No. " + lblrequestid.Text + "", "*****@*****.**"); }
void Send_mail(string strPass) { StringBuilder strBody = new StringBuilder(); strBody.Append("<table class='style1'>"); strBody.Append("<tr><td>"); strBody.Append("<img alt='rupeeboss.com' width='120px' src='http://erp.rupeeboss.com/Common/Images/Logo.png' "); strBody.Append("style='height: 100px' /></td>"); strBody.Append("<td style='font-weight: bold; font-family: Verdana; font-size: 14px; '"); strBody.Append("valign='middle'>"); strBody.Append("Welcome to <span style='color: #FF0000'> RupeeBoss.com ERP </span></td>"); strBody.Append("</tr><tr><td colspan='2' class='style2' style='font-family: Verdana; font-size: 12px'>"); strBody.Append("Dear " + txtbroker.Text + ",<br />"); strBody.Append("<br />Your email id is your user name for RupeeBoss.com ERP login :"******"<br />Your Password is :" + strPass + "<br />"); strBody.Append("<br />URL to access your account http://erp.rupeeboss.com <br />"); strBody.Append("<br />Thanks You<br /><br />Software Team<br />"); strBody.Append("RupeeBoss.Com<br />"); strBody.Append("<a href='mailto:[email protected]'>[email protected]</a><br />"); strBody.Append("91.9920298619<br /> </td></tr></table>"); ClsSendMail.Send_Mail_Direct(txtEmail.Text, strBody.ToString(), "Welcome to RupeeBoss.com", "*****@*****.**"); }
protected void Button3_Click(object sender, EventArgs e) { string[] Param = new string[2]; Param[0] = "email"; Param[1] = TxtEmail.Value; // TxtEmail.Value = "Dsdsdsds"; DataSet ds = new DataSet(); ds = CommanDataLoad.ExecuteDataSet("User_Master_Password_Select", "1", "Forgot_Password", Param); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { str1 = ds.Tables[0].Rows[0]["email"].ToString(); str2 = ds.Tables[0].Rows[0]["pass"].ToString(); str3 = ds.Tables[0].Rows[0]["username"].ToString(); string mobile = ds.Tables[1].Rows[0]["mobile"].ToString(); string name = ds.Tables[1].Rows[0]["emp_name"].ToString(); // if (TxtEmail.Value == str1) // { string strPass = CommanDataLoad.Generate(6, 8); string str = "update usr_login set pass='******' where email='" + TxtEmail.Value + "' or empcode='" + TxtEmail.Value + "'"; CommanDataLoad.ExecuteNonQuery(str, "2", "Change Pass", ""); String strbody = ""; strbody = strbody + "<table><tr><td><img alt='RupeeBoss.com' width='120px' src='http://erp.rupeeboss.com/Common/Images/Logo.png' ' /></td>"; strbody = strbody + "<td style='font-weight: bold; font-family: Verdana; font-size: 12px;' valign='middle'>"; strbody = strbody + "Welcome to RupeeBoss-ERP</td></tr></table>"; strbody = strbody + "<br/>Dear " + str3 + ",<br/>"; strbody = strbody + "<br/>Your Password is : " + strPass; strbody = strbody + "<br/><br/>Thank You"; strbody = strbody + "<br /><br />RupeeBoss Software Team<br />"; strbody = strbody + "<br />+91.9920298619<br />"; strbody = strbody + "<br />[email protected]<br /></p>"; string stra = ""; try { stra = ClsSendMail.Send_Mail_Direct(str1, strbody, "Password detail", "*****@*****.**"); string smsbody = "Dear " + name + ", Your password for RB ERP and APP is " + strPass; CommanDataLoad.Send_SMS_Save_Data(mobile, smsbody, Request.UserHostAddress); GetMessage(); Clear(); } catch (Exception ex) { Response.Write(stra + "--" + ex.Message); // GetError(); } Response.Write(stra); // } } else { lblmsg.Text = "User not found"; } } else { lblmsg.Text = "User not found"; } }