Send Emails through JSP(Java server Page)

Hi , Every one Today we are going to learn a simple jsp code to send email .

There might me n no. of situations where in you may require to a page where in you need to send email.

Following code might save you

To achieve this we require two libraries

  1. mail-1.4.1.jar
  2. activation-1.1.1.jar

I’ll leave the links below so you download them.

So the code

The code itself is self explanatory.
Just insert the

  • authAddress with the sender email id
  • authPassword with the sender password
  • smtpServer with your smtp server address
  • smtpPort    with your smtp server port
  • subject   with subject for your email
  • email    with the receiver email address

And run , it will start shooting emails as you click on Send

You can download both the JAR from the GitHub Link.

Else you can clone the Project

git clone

Feel free to comment 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.