0

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?

4

1 回答 1

1

使用以下代码:

final Intent mEmailIntent = new Intent(android.content.Intent.ACTION_SEND);
    mEmailIntent.setType("application/text");
    mEmailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"sender@somedomain.com"});
    mEmailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
    mEmailIntent.putExtra(Intent.EXTRA_TEXT,Html.fromHtml(new StringBuilder()
                                    .append("<b>c11 &nbsp c12 &nbsp c13</b><br>")
                                    .append("<b>c21 &nbsp c22 &nbsp c23</b><br>")
                                    .append("<b>c31 &nbsp c32 &nbsp c33</b><br>")
                .toString()));
    startActivity(Intent.createChooser(mEmailIntent, "Please choose an option to send mail : "));

希望对你有帮助...

于 2013-08-21T13:21:09.613 回答