MailMessage msg = new MailMessage(); SmtpClient smtp = new SmtpClient(); MailAddress from = new MailAddress("abc@gmail.com"); StringBuilder sb = new StringBuilder(); msg.IsBodyHtml = true; smtp.Host = "smtp.gmail.com"; smtp.Port = 587; msg.To.Add(model.Email); msg.From = from; msg.Subject = "Registration success full on VibExchange ! "; msg.Body += " <html>"; msg.Body += "<body>"; msg.Body += "<table>"; msg.Body += "<tr>"; msg.Body += "<td>Thank you for registering on VibExChange. Your User Name and Password is : </td>"; msg.Body += "</tr>"; msg.Body += "<tr>"; msg.Body += "<td>User Name : </td><td>" + model.UserName + "</td>"; msg.Body += "</tr>"; msg.Body += "<tr>"; msg.Body += "<td>Password : </td><td>" + model.Password + "</td>"; msg.Body += "</tr>"; msg.Body += "<tr>"; msg.Body += "<td>Email Pin : </td><td>" + EmailVerification.ToString() + "</td>"; msg.Body += "</tr>"; msg.Body += "<tr>"; msg.Body += "<td>for Email Verification </td><td><a href='http://www.vibration-service.com/Home/EmailVerification'> Click Here </a></td>"; msg.Body += "</tr>"; msg.Body += "<td>for more information </td><td><a href='www.vibration-service.com'> Click Here </a></td>"; msg.Body += "</tr>"; msg.Body += "</table>"; msg.Body += "</body>"; msg.Body += "</html>"; smtp.UseDefaultCredentials = false; smtp.EnableSsl = true; smtp.Credentials = new NetworkCredential("abc@gmail.com", "1857"); smtp.Send(msg); msg.Dispose();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)