Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No application can perform this action, when send email

Intent sendIntent = new Intent(Intent.ACTION_SEND);
            sendIntent.putExtra(Intent.EXTRA_TEXT, text.getText());
            sendIntent.setType("message/rfc822");
            startActivity(Intent.createChooser(sendIntent, "Send email with"));

this was my code.

I tried the send mail in emulator. But it shows the no application can perform this action. if anyone knows means tell me

Thanks in advance

like image 481
Aoryouncellvan Avatar asked Feb 18 '15 16:02

Aoryouncellvan


1 Answers

You need to use text/plain

intent.setType("text/plain");

Also, the Intent.ACTION_SEND is made for sharing, you may want to use Intent.ACTION_SENDTO to only get the list of e-mail clients, or avoid sharing applications such as Facebook, Twitter, etc.

like image 140
Gorcyn Avatar answered Oct 19 '22 18:10

Gorcyn