Home ยป Example of sending html content with email in Java

Example of sending html content with email in Java

by Online Tutorials Library

Sending email with Html content

As we send the email, we can send the html content also.

For better understanding of this example, learn the steps of sending email using JavaMail API first.
For receiving or sending the email using JavaMail API, you need to load the two jar files:

  • mail.jar
  • activation.jar

download these jar files (or) go to the Oracle site to download the latest version.

Example of sending email with html content using JavaMail API

Load the jar file c:> set classpath=mail.jar;activation.jar;.;
compile the source file c:> javac SendHtmlEmail.java
run by c:> java SendHtmlEmail

You may also like