trainingtrains Logo

91-9990449935

 0120-4256464

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