Kalyani Shevale

Kalyani Shevale

  • 605
  • 3.2k
  • 159.2k

from IIS and Server and Godaddy Mail Not Seding

Nov 5 2019 12:00 AM
   
below code 
  1. string subject = "Your Password";  
  2.                    string body = "Password :" + data.password;  
  3.                    //"<b>"+mailInfo.Body+" </b><br/>" + lnkHref;  
  4.   
  5.                    MailMessage mail = new MailMessage();  
  6.                    SmtpClient SmtpServer = new SmtpClient("mail.****.com");  
  7.   
  8.                    mail.From = new MailAddress("*****@domain.com");  
  9.   
  10.                    mail.To.Add(EmailId);  
  11.                    mail.Subject = subject;  
  12.                    mail.Body = body;  
  13.                    SmtpServer.Port = 587;  
  14.                    SmtpServer.Credentials = new System.Net.NetworkCredential("*****@domain.com""*********");  
  15.                    SmtpServer.EnableSsl = false;  
  16.                    SmtpServer.Send(mail);  
  17.                      
 please provide any Solution

Answers (4)