File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes sending mail with JAVA API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "sending mail with JAVA API" Watch "sending mail with JAVA API" New topic

sending mail with JAVA API

kolawole kolawole

Joined: Mar 31, 2005
Posts: 5
what re the softwares required to send a mail in java using the java mail API.

how do i integrate these sofwares in order to send a mail.
Senthil Kumar Somsundaram

Joined: Mar 10, 2005
Posts: 1
Can you be bit more clear with the question?
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 160
1) Setup a Mail Server or You can use any existing mail server reachable in the network.
2) JavaMail API
3) Write your java class to send the mails, using the JavaMail API. Mention the mailserver address in these api's.

When the send function is called the mail is sent via the Mail Server.

Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
St�phane TRAUMAT

Joined: Apr 06, 2005
Posts: 5

You can download the javamail api at

Then, you can send a mail with this kind of code:

It's quite simple and it works very well

St�phane TRAUMAT<br />JOnAS Live author
I agree. Here's the link:
subject: sending mail with JAVA API
jQuery in Action, 3rd edition