android send html mail using intent

Posted by Javadid on Stack Overflow See other posts from Stack Overflow or by Javadid
Published on 2010-03-30T09:36:59Z Indexed on 2010/06/16 16:02 UTC
Read the original article Hit count: 499

Filed under:
|
|
|

hi friends... i have generated an html code(complete with tags) as a String... now i want to send this html code as a html to mail... my code is as below..

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/html");
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
intent.putExtra(Intent.EXTRA_SUBJECT, "I would like to buy the following");
intent.putExtra(Intent.EXTRA_TEXT, purchaseOrder());
startActivity(Intent.createChooser(intent, "sending mail"));

where the purchaseOrder() is the method which passes me the string having full html code... but though the gmail client opens on my nexus1 but it has the String with all html tags and not the actual html view... i tried the following but got error... The gmail crashed...

intent.putExtra(Intent.EXTRA_STREAM, purchaseOrder());

Can any1 plz help...

Thanx

© Stack Overflow or respective owner

Related posts about html

Related posts about android