I am using below code in c#,
string Subject = "test12";
MailMessage mail = new MailMessage();
mail.To.Add(item.ToString());
mail.From = new MailAddress(EmailUserName);
mail.Subject = Subject;
mail.Body = PopulateBody();
mail.IsBodyHtml = true;
SmtpClient client = new SmtpClient(EmailHost, EmailPort);
client.EnableSsl = true;
NetworkCredential credentials = new NetworkCredential(EmailUserName, EmailPassword);
client.UseDefaultCredentials = false;
client.Credentials = credentials;
client.Send(mail);
I am getting error in Client.send(mail) method
What I have tried:
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The function requested is not supported --- End of inner exception stack trace --- at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at