aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Sample Java Mail program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Sample Java Mail program" Watch "Sample Java Mail program" New topic
Author

Sample Java Mail program

An Sush
Ranch Hand

Joined: Jan 17, 2007
Posts: 47
Hi,
I want to setup a simple java application to send mail using javax.mail api. Please tell me what all is need? like the mail server, the settings etc
Can Websphere Application Server v6.1 be used as a mail server? If not, tell me some free mail servers.
Thanks,
An
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
I think all J(2)EE compliant servers include a mail server, but if not, check out Apache James.

The http://faq.javaranch.com/java/JavaEnterpriseEditionFaq points to much useful material regarding JavaMail, including a lengthy tutorial at java.sun.com that has many code examples.


Ping & DNS - updated with new look and Ping home screen widget
Janardan Kelkar
Ranch Hand

Joined: May 05, 2008
Posts: 72

I had developed an email client as one of my college projects.We had used that java mail API, and had used the mercury mail server available with XAMPP. It works good enough.


When the compiler's not happy, ain't nobody happy.
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

Hi,
See this Example. I think this will help you.

Regards,
Vinoth


Java Best Practices
Linux Best Practices
Amortization Calculator

Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

Most versions of Windows come with a mail server as part of IIS (not the Windows Home versions), and all Unix versions should have the option to install Exim, Postfix or Sendmail.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Sample Java Mail program
 
Similar Threads
About Java Mail??
How detect new mails arrived in mail server using java?
sending java mails
how to implement e-mail sever using java/jsp/struts?
Java Mail API