I want to send emails with javamail-android but I'am using a host server different than usual ones (Gmail, Yahoo, Hotmail, etc). The host is accessed via APN throught the mobile data network, I don't know how configure this. Currently my code for sending email setup all fields like this:
mailer.setFrom("myself@xxxxx.com");
mailer.setUser("myself@xxxxx.com");
mailer.setPassword("xxxxxxxxxx");
mailer.setHost("smtp.xxxxx.xx");
mailer.setPort(25);
mailer.setSocketFactoryPort(25); // ?
I'm getting the next error Unknown SMTP host: smtp.xxxxx.xx. I know for sure that at least the above data is OK. But I don't know how to use the previous configuration on APN and "mobile-data". Is there something wrong with this configuration ? Do I have to change something to make it work with APN and mobile data network?
My code for sending email is almost the same described here.