string strbody = "";
strbody += "<tr><td>Thank you for registering into our site.<br /></td></tr><tr><td> To verify your account <a href='http://localhost:2976/Registration.aspx?UserID=" + u_id + "&SendId=" + s_id + "'>click here</a><br /><br /></td></tr>";
// strbody += "Once verified, you can login with the following credentials:<br /></span><br /></td></tr><tr><td style=width: 163px>Username:" + txtEmail.Text + "</td></tr><tr><td style=width: 163px>Password:" + txtPassword.Text + "<br /><br /></td></tr>";
MailMessage mail = new MailMessage();
mail.To.Add(txtEmail.Text);
mail.From = new MailAddress("hariharan.vst10@gmail.com");
StringBuilder sb = new StringBuilder();
sb.Append(txtEmail.Text);
sb.Append(txtPassword.Text);
mail.Subject = "Welcome";
// mail.Body = sb.ToString();
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new System.Net.NetworkCredential("hariharan.vst10@gmail.com", "jhj");
smtp.EnableSsl = true;
mail.Body = strbody;
//mail.Body = "Your User Name is:" + txtemail.Text + "Password :" + txtpassword.Text;
//mail.Body = "http://Activationlink.aspx?id=";
smtp.Timeout = 100;
smtp.Send(mail);
good
ReplyDelete