string subject = "Your Password";-
string body = "Password: " + data. password; - //""+mailInfo
. Body+" <br />" +lnkHref ; - MailMessage mail = new MailMessage
( ); -
SmtpClient SmtpServer = new SmtpClient("mail.****.com"); -
mail . From = new MailAddress("*****@domain.com"); -
mail . To. Add( EmailId ); -
mail . Subject = subject; -
mail . Body = body; -
SmtpServer . Port = 587; -
SmtpServer . Credentials = new System.Net.NetworkCredential("*****@domain.com", "*********"); -
SmtpServer . EnableSsl = false; -
SmtpServer . Send( mail);
Loading

Dinesh GabhaneRank #265 · 9.5K reputationPosted Nov 4, 2019, 7:26 PM EST
Dinesh GabhaneRank #265 · 9.5K reputationPosted Nov 4, 2019, 7:34 PM EST
Kalyani ShevaleRank #1,111 · 1.7K reputationPosted Nov 4, 2019, 7:29 PM EST
Kalyani ShevaleRank #1,111 · 1.7K reputationPosted Nov 4, 2019, 8:00 PM EST