Sending email via APK version

Hey guys, I have a function that sends an email :

void SendEmail (string email)
				MailMessage mail = new MailMessage ();
				mail.From = new MailAddress ("");
				mail.To.Add (email);
				mail.IsBodyHtml = true;
				mail.Subject = "subject";
				mail.Body= "Check";
				SmtpClient smtpServer = new SmtpClient ("");
				smtpServer.Port = 587;
				smtpServer.Credentials = new System.Net.NetworkCredential ("", "bettertrythispassword") as ICredentialsByHost;
				smtpServer.EnableSsl = true;
				ServicePointManager.ServerCertificateValidationCallback = 
			delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) {
						return true;
				smtpServer.Send (mail);
				Sent = true;

This function works perfectly on the Unity PC Editor.
However, when I try and export it as an APK and run it on an android- it ALWAYS falls to the catch phase- so it throws some error and does not work. The email I have inserted is a valid one but for some reason it works on the editor and not on android.

I have also tried to set the Api compatibility level to .NET 2.0 instead of .NET 2.0 Subset, but without any luck.

Does anyone have any idea whats going on? Thanks for any light on that matter,

Okay, solved the problem myself.
In the player settings :
Api compatibility level → .NET 2.0
Internet access → Require.