One month into a start-up as trainees, and we were asked to write a program to send an email, in the Spring project. After trying a lot of different ways, we finally got a solution. Come, let’s have a look. — Okay before moving to the actual coding part and importing java classes, responsible to send email. We need to add those classes (JAR / API), to the class-path of our project. By default, Java does not ship with those classes.