I\'m a newbie in android. Please help me. I\'m not able to send email to multiple recipients. Here is my code.
public class SendEmailActivity extends Activit
If I were you I would put this on a different thread so that you don't have any process on the Activity thread (or UI thread). This is a good android tutorial on how to do this. Threading is really important to understand in Android. If you have time I would watch this threading tutorial as well.
button.Onclick(){
// get all the messages information
// the button to send the emails has been collected
new SendEmailTask().execute(messages)
}
Then in your Async Task you can send all of the messages
SendEmailTask extends AsyncTask(){
function doInBackground(Message... msgs){
for(Message m : msgs){
// process each of your messages
// send the messages out
}
}
function onPostExecute(){
// tell the UI thread that you are finished
}
}
Good Luck!