using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
put the below code somewhere before smtpclient.Send()
ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate,
X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
return true;
};In this code we will learn how remote certificate is invalid according to the validation procedure.