发送邮件到多个地址的Android [英] Send Email to Multiple Addresses Android
本文介绍了发送邮件到多个地址的Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想选择一些电子邮件地址,然后发送电子邮件给所有的人。
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.
这篇关于发送邮件到多个地址的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文