android send html mail using intent
- by Javadid
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