Reputation: 1809
I have searched a lot to send html text using in gmail, but as gmail not support any advance tags, How to send email in table format from android? any way to align text as column using or any other tag?
I want to send email in below format:
c11 c12 c13
c21 c22 c23
c31 c32 c33
.... ... ... ....
When I send this type email from ios, it works, and it also display column wise in android gmail. Then it's not possible to send from android?
Upvotes: 0
Views: 275
Reputation: 758
Use the following code :
final Intent mEmailIntent = new Intent(android.content.Intent.ACTION_SEND);
mEmailIntent.setType("application/text");
mEmailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
mEmailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
mEmailIntent.putExtra(Intent.EXTRA_TEXT,Html.fromHtml(new StringBuilder()
.append("<b>c11   c12   c13</b><br>")
.append("<b>c21   c22   c23</b><br>")
.append("<b>c31   c32   c33</b><br>")
.toString()));
startActivity(Intent.createChooser(mEmailIntent, "Please choose an option to send mail : "));
Hope this will help you...
Upvotes: 1