title: Send Mail using JAVA
body: <p>Hi i would like to send a simple mail using java.. So i downloaded mail.jar and activation.jar file and i wrote simple program to send it.</p>
  
  <p>My Simple mail program compiles successfully..
  But when i run it shows the following error.</p>
  
  <p>javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
    nested exception is:
          java.net.ConnectException: Connection refused: connect</p>
  
  <p>My doubt is how to find the SMTP server name for my PC? I searched in site but didnt get anything clearly..</p>
  
  <p>Please make me to travel in a right direction...</p>
  
  <p>With regards</p>
  
  <p>Xavier KCB</p>