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 HereWEBlog