I have this code:
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent Mail = new Intent(Intent.ACTION_SEND);
Mail.setData(Uri.parse("mailto:"));
Mail.putExtra(Intent.EXTRA_EMAIL,"[email protected]");
Mail.putExtra(Intent.EXTRA_CC,"[email protected]");
Mail.putExtra(Intent.EXTRA_SUBJECT,"tema");
Mail.putExtra(Intent.EXTRA_TEXT,"cuerpo correo");
Mail.setType("message/rfc822");
startActivity(Intent.createChooser(Mail,"send Email"));
}
});
what happens is that when it is executed in the gmail application it shows the subject and the body, but it does not show who it is addressed to or the copy
Could it be a version issue or something?
In case it helps, what I do is that I send an array to the sender, in case I want to send it to several at the same time. For example, this code works perfectly for me:
And by the way I check if you have any mail manager installed or not before doing any action.
Be careful, to verify it, you have to do it on a real device, since on an emulator it does not usually work well. I guess it's because of settings.
Luck!