Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding the Body in the Email in Android

Tags:

android

I had developed the email sending functionality in my Application where I need to send the email with the specified subject. I have done that but I need that as soon as I click the Email Icon It sets some particular piece of Information in the Body part of the email format. It could be any information that I have with me.

Is it possible to set the data in the Email Body in android, I don't want to write anything in the Body of the mail.

Thanks, DavidBrown

like image 743
David Brown Avatar asked Nov 21 '12 05:11

David Brown


People also ask

How to add an email account on Android?

How to Add Email Account on Android How to Add an Email Account on Android - Adding a Web Mail (Gmail, Hotmail, Outlook, Yahoo) Account 1 Open Gmail on your Android. 2 Tap your profile picture. 3 Tap Add account. 4 Select an email provider. 5 Enter the email address you want to add. 6 ... (more items) See More....

Does the Android native Mail app show the body content?

The same occurs with native mail app on android, and this problem was reported by many of our users. Weird thing is, android native app does show the body content! I came to realize this when clearing all e-mail accounts on my phone, re-adding them on both outlook and native android mail app.

How do I add an email address to my Gmail account?

1 Open Gmail on your Android. 2. Tap ☰. 3. Tap your profile picture. 4. Tap Add account. 5. Select an email provider. 6. Enter the email address you want to add. 7. Tap Next. 8. Enter your email password. 9. Tap Next. 10. Tap I AGREE. 11. Switch between email accounts.

How do I set up Gmail on my Android phone?

Open Gmail on your Android. It's the red and white envelope icon that's usually on the home screen. Tap ☰. It's at the top-left corner of the screen. Tap your profile picture. It's near the top-left corner of the menu. The menu now displays fewer options. Tap Add account. Select an email provider.


2 Answers

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

  emailIntent.setType("plain/text");

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

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

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

  startActivity(Intent.createChooser(
          emailIntent, "Send mail..."));

Intent.EXTRA_TEXT is what you are looking for.

like image 178
PC. Avatar answered Oct 15 '22 04:10

PC.


Try this

intent.putExtra(Intent.EXTRA_TEXT   , 
                "body of email -- add text what you want ");
like image 44
RajaReddy PolamReddy Avatar answered Oct 15 '22 05:10

RajaReddy PolamReddy