I am using Unity5 and writing some code to send a basic mail. I've read documentation as well as other users' problems, but can't seem to get my code to work properly. When I try to send the mail get this error : "InvalidOperationException: SSL authentication error: RemoteCertificateNotAvailable, RemoteCertificateChainErrors"
Here is my code so far, hope you guys got any advice ! :) Thanks.
var client = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587)
{
Credentials = (ICredentialsByHost)new System.Net.NetworkCredential("MyMail", "MyPWD"),
EnableSsl = true
};
client.Send("MyMail", "MyPWD", "test", "testbody");