Hi All
I am using Unity 2018.3.7. In My project i am sending mail from my APK. I am using the below code for send mail.
public void Start() {
using (var mail = new MailMessage {
From = new MailAddress(sender),
Subject = "test subject",
Body = "Hello there!"
}) {
mail.To.Add(receiver);
var smtpServer = new SmtpClient(smtpHost) {
Port = 25,
DeliveryMethod = SmtpDeliveryMethod.Network,
EnableSsl = true,
UseDefaultCredentials = false,
Credentials = (ICredentialsByHost)new NetworkCredential(sender, smtpPassword)
};
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
smtpServer.Send(mail);
}
}
}
The mail is send from editor, Android Version 8.0,9.0 and ipad. But the mail is not send from android 7 versions
Samsung j3 prime, MI …
So what i have to send mail from unity android 7.0. Is there any default settings.
I have enabled less secure apps, intenet access = require, .net 4.0 stripping level disabled…
NOTE: IT IS WORKING IN ANDROID 8.0. ANDROID 7.0 MAIL IS NOT SENDING FROM IT.