Reputation: 1426
Im trying to send an email from my app, i see the link as should in my email client on my android, but when i check the email receiver, there is no links.
Here is my Code:
emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(Intent.EXTRA_EMAIL,
new String[] { "" });
emailIntent.putExtra(
android.content.Intent.EXTRA_SUBJECT,
MainActivity.getCurrentActivity().getString(
R.string.mailTitle));
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
Html.fromHtml(text));
'text' is html.
Thank You.
Upvotes: 0
Views: 197
Reputation: 1774
Try this one
private void sendMail(String[] emailaddressList)
{
Intent sendIntent;
sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.setType("text/html");
String body="Go to this link \n\n\n";
String link=Html.fromHtml(body)+"\"https://www.google.com"";
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Mail test");
sendIntent.putExtra(Intent.EXTRA_TEXT, link);
sendIntent.putExtra(Intent.EXTRA_EMAIL,emailaddressList);
startActivity(Intent.createChooser(sendIntent, "Send Mail"));
}
Upvotes: 1