This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Author

sending mail with JAVA API

kolawole kolawole
Greenhorn

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
Greenhorn

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: 140
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
Greenhorn

Joined: Apr 06, 2005
Posts: 5
Hello,

You can download the javamail api at
http://java.sun.com/products/javamail/

Then, you can send a mail with this kind of code:
http://www.javaalmanac.com/egs/javax.mail/SendApp.html

It's quite simple and it works very well


St�phane TRAUMAT<br />JOnAS Live author
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: sending mail with JAVA API