Posts

Showing posts from December, 2008

Sending Mail Using Java

Image
In this post, I would like to discuss how to send an e-mail using javax.mail library. I will discuss how to send an e-mail for the simplest case. ie: I present my example for a scenario without authorization and other related issues. Once you get this mail application up and running, you can extend it further. I would regard my example as a beginner's starting position. As I preffer to say, "Start from trivial" Dont't start your application with all complications and Network issues. You will get frustrated very soon. Once you get the trivial running, add the other requirements as features to your application. In order to get started, you need an SMTP server. (When I mean a server, it does not necessarily mean a seperate machine running as a server. You can simply run a server application on your own machine) An SMTP(Simple Mail Transfer Protocol) server is very similar to a post box. You pop a mail with the destination address stamped and, it takes care of delivering