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
First your conversion from List to String[] is wrong you need to do as follows..
List list = new ArrayList();
String[] arrayOfStrings = list.toArray(new String[list.size()]);
And next thing is you need to mention android.Content.Intent as follows..
So finally you need to change as follows
ArrayList emailList;
emailList = b.getStringArrayList("EmailList");
String[] emailArray;
Intent email = new Intent(android.content.Intent.ACTION_SEND);
for(int i = 0; i < to.length; i++){
Log.i("String is", (String)to[i]);
email.putExtra(android.content.Intent.EXTRA_EMAIL,
emailList.toArray(new String[emailList.size()]));
}
email.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
email.putExtra(android.content.Intent.EXTRA_TEXT, message);
email.setType("message/rfc822"); //or email.setType("text/plain");
startActivity(Intent.createChooser(email, "Choose an Email client :"));