0

I have set the receiver email address but when I tried to use it on my phone the receiver address is empty and you have to fill it on manually. I think the code is fine I don't know what the problem

CODE:
Intent mail = new Intent(android.content.Intent.ACTION_SEND);
mail.putExtra(android.content.Intent.EXTRA_EMAIL, "[email protected]");
mail.setType("plain/text");
startActivity(mail);
Kara
  • 6,115
  • 16
  • 50
  • 57

3 Answers3

0

Try to fill all the available options like Subject, Text.

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

emailIntent.setType("plain/text");

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, "[email protected]");

emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Your Subject Here");

emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Body Part here");

startActivity(emailIntent);

Hope you have given all the permissions Correctly.

Some references. Link 1, Link 2

Community
  • 1
  • 1
Bhavin
  • 6,020
  • 4
  • 24
  • 26
0
String[] reciver  = new String[]{
                        "[email protected]",
                        "[email protected]",
                         ...
                     };
mailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, reciver);
xxbinxx
  • 1,527
  • 11
  • 18
Dingo
  • 1
  • Always format your Questions && answers properly. Use the tools provided while you answer. This helps in easy understanding of code. Unformatted code though be v.good but people most likely to avoid it. – xxbinxx Sep 10 '14 at 04:48
-1

Maybe you should insert the receiver email here:

mail.putExtra(android.content.Intent.EXTRA_EMAIL, "[email protected]");
gutiory
  • 1,135
  • 5
  • 13
  • 33
  • I don't understand what you mean. That's where I inserted it. But when I use it on my device the receiver address is empty. – Nikos Kikas May 16 '12 at 05:47