Skip to content Skip to sidebar Skip to footer

How To Send HTML Mail In Android

IO want to send email in html format in android. I am able to send mail via gmail client but I am not able to get the styles of html of when I use any other client. I have used bel

Solution 1:

try this

final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
startActivity(Intent.createChooser(emailIntent, "Email:"));

Solution 2:

try this I am not sure but it may be help you..

startActivity(Intent.createChooser(new Intent(Intent.ACTION_SEND).setType("message/rfc822")
.putExtra(Intent.EXTRA_SUBJECT, subject)
.putExtra(Intent.EXTRA_TEXT,Html.fromHtml(new String().concat("YOUR MESSAGE")), 
 "Send your email in:"));

Thanks.


Post a Comment for "How To Send HTML Mail In Android"