How to send email with image icon displayed in bod

2020-07-23 09:00发布

I have a task about embed an icon in Gmail body with HTML tag. But when i do, it only display an image with the text OBJ inside (as same as here) I wonder that does Android support displaying image in Gmail body android? Here is my code:

String htmlSendMail = "<img src= " + (char) 34 + status.getUser().getProfileImageURLHttps() + (char) 34 + " />";
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, 
                       "Tweet from " + name + "(@" + screenName + ")");
emailIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(htmlSendMail));
startActivity(Intent.createChooser(emailIntent, "Send mail via..."));

My screenshot

0条回答
登录 后发表回答