Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to send email from my android app...i got some code for this from internet but it is not executed...i am not recognized who is sender of this mail..
where sender is mention...plz tell me how it work..


Intent i = new Intent(Intent.ACTION_SEND);
i.setData(Uri.parse("mailto:"));
String[] to = { "someone1@example.com" , "someone2@example.com" };
String[] cc = { "someone3@example.com" , "someone4@example.com" };
i.putExtra(Intent.EXTRA_EMAIL, to);
i.putExtra(Intent.EXTRA_CC, cc);
i.putExtra(Intent.EXTRA_SUBJECT, "Subject here...");
i.putExtra(Intent.EXTRA_TEXT, "Message here...");
i.setType("message/rfc822");
startActivity(Intent.createChooser(i, "Email"));
Posted

1 solution

There are several examples available on internet. You can refer to this link which is simple example of sending an email.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900