net code for sending mail via Gmail is not working did everything like less secure apps turned on, powerful password, with and without app password, with and without two-step verification.
coding:-
{
    var fromAddress = new MailAddress("doctor@gmail.com");    
    var fromPassword = "idntcare";        
    var toAddress = new MailAddress("thevarghese@gmail.com");    
    string subject = "subject";    
    string body = "body";    
    System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient
    {
         Host = "smtp.gmail.com",
         Port = 587,
         EnableSsl = true,
         DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network,
         UseDefaultCredentials = false,
         Credentials = new NetworkCredential(fromAddress.Address, fromPassword)
    };
    using (var message = new MailMessage(fromAddress, toAddress)
    {
         Subject = subject,
         Body = body
    })    
    smtp.Send(message);    
}
 
     
     
    