How to specify inline css style in java-mail? Or How to include CSS in java mail?

How to give inline css style in java mail? or How to include CSS in java mail?

+3
source share
1 answer

The first thing you need to do is to indicate that you will be sending html, not plain text. You can do this by setting the content type:

message.setContent(text, "text/html; charset=utf-8");

Once you do this, you can use CSS in your telephoto. Be careful, as not all CSS features are available for your use in the email. See http://www.sitepoint.com/how-to-code-html-email-newsletters/ for more details.

0
source

Source: https://habr.com/ru/post/1755922/


All Articles