Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending HTML email intents without having <img>'s removed?

Note: I know there are a lot of similar questions on SO. However, I am not trying to inline these images, I just want the html to stay as is.

It seems like the normal way to send html emails through an intent is to use Html.fromHtml(String)

For example:

Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/html");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
intent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(htmlString));
startActivity(intent);

However, as it states in its documentation, it replaces all tags with a special character for use with an ImageGetter.

I do not want to inline and attach these images. I just want the img tags to stay as is in the html. I do not need to attach the images.

For example, I want: <img src="http://www.somedomain.com/somewebsite/someimage.jpg" /> to stay that way.

Is this possible?

Thanks

like image 764
cottonBallPaws Avatar asked Mar 04 '11 21:03

cottonBallPaws


1 Answers

Standard Compliant eMail Clients will always strip img tags, until the user grants permission otherwise.

Images in emails can identify your computer on the server from they are being requested from, thus its a security measure and will stay like that until a new, better system is created.

like image 112
Oliver M Grech Avatar answered Sep 19 '22 09:09

Oliver M Grech