I am new to android. I want to send mail from my application . I want to use two fields email address & text. can u help me ?
Asked
Active
Viewed 163 times
2 Answers
1
It's very simple to do it:
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{address});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(Intent.EXTRA_TEXT, emailtext);
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
And don't forget to add this to your manifest file:
<uses-permission android:name="android.permission.INTERNET" />

Tiago Babo
- 1,064
- 1
- 7
- 9
1
checkout this : sending email programatically using default user account
and this :
http://www.helloandroid.com/tutorials/how-send-email-your-application
for more details.

Community
- 1
- 1

Dinesh Sharma
- 11,533
- 7
- 42
- 60