I am trying to setup SMTP server on IIS for sending mails. The SMTP server is intended to be used by the ASP.NET code in C#.
I was previously using gmail smtp where
If you want to test emails in localhost, just download install the papercut tool https://papercut.codeplex.com/
and change hostname to localhost as below. Papercut captures all the emails sending using localhost.
smtpClient.UseDefaultCredentials = false;
smtpClient.Host = "localhost";
smtpClient.Port = 587;
smtpClient.Credentials = new NetworkCredential(uname,pwd);
smtpClient.EnableSsl = true;