我想选择一些电子邮件地址,然后发送电子邮件给所有的人。
I want to select a number of email addresses and then send an email to all of them.
我的code是如下:
emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL,new String[]{listofemailaddresses});
emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, "My Subject");
emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, Constants.SMS_MESSAGE);
this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));`
listofemailaddresses
是一个包含了所有由一个,号隔开的电子邮件的字符串。但到域总是空在此。
listofemailaddresses
is a string which contains all the emails separated by a ',' sign. But the To field is always empty in this.
将此行添加到您的code:
Add this line to your code:
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
new String[] { "appsupport@YOUR_DOMAIN.com" });
这将填补屏幕的收件人一节。
This will fill the "To" section of your screen.