How can I get a response that I have successfully logged on without sending email?
try
{
var client = new SmtpClient();
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Host = "smtp.gmail.com";
client.Port = 587;
client.Credentials = new NetworkCredential(email, pw);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.ReadKey();
}
with:
using System.Net;
using System.Net.Mail;
But this gives my neither a correct response nor an error when I change from correct to incorrect password. How can I get a log on response? or do I have to send a test email to test connection? Can you really only establish connection with:
client.send(...);