1

Possible Duplicate:
android - How to create table in the email body

I want to send an html email from my android application.I am using tag in this html. I know that Html.fromHtml() method does not support tags.So the mail shows as plain text.I want to send this data as a table and never attached.How can i achieve this. I am using

Intent emailIntent = new Intent(Intent.ACTION_SEND);
 emailIntent.setType("text/html");
 emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
 emailIntent.putExtra(Intent.EXTRA_SUBJECT, "");
 emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,Html.fromHtml(emailContent));
 startActivity(Intent.createChooser(emailIntent,"Send mail..."));

Thanks in advance.

Community
  • 1
  • 1
Asha Soman
  • 302
  • 2
  • 6
  • 18

1 Answers1

1

Have you tried like this:

String body = new String("<html><body><table><tr><td><br/>" +header+"</td></tr><br/><br/>"+"Get <b> Best Score </b> in your Android Phone.<br/>"+"<a href=\"" + link_val + "\">" + text_value+ "</a>");

emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, html.fromHtml(body));
  • If, it was not working for you, please post your code.. –  Sep 18 '12 at 09:22
  • Yes.But html.fromHtml(body) did not support