email « Host « JSP-Servlet Q&A

1. How to Host mail using java api?

i want to host mail on my machine.So i can able to send and received mails through my machines. is there any api in java to do the same.. thanx

2. Trying to send an email using javamail from a servlet hosted on godaddy shared linux hosting account

The following is my code public void sendEmail() throws MessagingException{

String messagetxt = "Message";
String subject = "Subject";
boolean debug = false;
String from = "";
String[] recipients = {""};
//Set the host smtp address
Properties props = new ...