Android : In android, How to send an email without user interaction, other than gmailsender, any yahoo mail or corporate mail like?

on Wednesday, August 6, 2014


i am using the code snippet like below


class SendEmailAsyncTask extends AsyncTask { Mail m = new Mail("someone@gmail.com", "password");



public SendEmailAsyncTask() {
if (BuildConfig.DEBUG) Log.v(SendEmailAsyncTask.class.getName(), "SendEmailAsyncTask()");
String[] toArr = {"someone@domain.com"};
m.setTo(toArr);
m.setFrom("someone@domain.com");
m.setSubject("Email from Android");
m.setBody("Got message");
}


i wanna use someone@anydomain.com instead of someone@gmail.com also is there any way to avoid using the password there?


Appreciating response


0 comments:

Post a Comment