Send email works in Editor, not on tablet

This is my code :

void Mail(){
		MailMessage mail = new MailMessage();
		mail.From = new MailAddress("aaaaa@gmail.com");

		mail.To.Add("bbbb@.com.vn");
		mail.Subject = "Hello!!!";
		mail.Body = "This is word and image for you.";
		string attachmentPath = filename;
		Debug.Log(attachmentPath);
		Attachment attachmentFile = new Attachment(attachmentPath);
		mail.Attachments.Add(attachmentFile);
		SmtpClient smtpServer = new SmtpClient("smtp.gmail.com");
		smtpServer.Port = 587;
		#if UNITY_IPHONE
		smtpServer.Credentials = new System.Net.NetworkCredential("aaaaaaaa@gmail.com", "xxxxxxxxx") as ICredentialsByHost;
		
		#endif
		#if UNITY_EDITOR_WIN
		smtpServer.Credentials = new System.Net.NetworkCredential("aaaaaaaa@gmail.com", "xxxxxxxxx") as ICredentialsByHost;
		#endif
		smtpServer.EnableSsl = true;
		ServicePointManager.ServerCertificateValidationCallback = 
			delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) 
		{ return true; };
		smtpServer.Send(mail);
	}
  • I run on unity3d ==> it is good.
  • I build into ios,android ==> install on device ==> run ==> it is error ( i don’t see email )
  • Why?? and Why??.

Have you followed all the advice in Unity 3 - Sending Email with C# - Unity Answers

(Particularly in the last answer)

Ensure that you have changed Internet access from auto to require in Player settings --> other settings --> configuration

Use this reference to create application specified password.