title: How to test sending email in blackberry eclipse plugin 1.1
body: <p>Hi friends I usedthe code below for sending mail.
  I tested it in JDE5.0 with ESS it doesnt work.
  So please give me some solution.</p>
  
  <p>import net.rim.blackberry.api.mail.<em>;
  import net.rim.blackberry.api.mail.event.</em>;
  import net.rim.device.api.system.*;
  public class BasicMail extends Application {
  private Store store;
  static void main (String args[]) {
  BasicMail app = new BasicMail("a");
  app.enterEventDispatcher();
  }
  BasicMail(String s)
  {
   //Get the Store from the default mail Session.
   Store store = Session.getDefaultInstance().getStore();</p>
  
  <p>//retrieve the sent folder
   Folder[] folders = store.list(Folder.SENT);
   Folder sentfolder = folders[0];</p>
  
  <p>//create a new message and store it in the sent folder
   Message msg = new Message(sentfolder);
   Address recipients[] = new Address[1];</p>
  
  <p>try {
        recipients[0]= new Address("poovavin@gmail.com", "poovannan");</p>
  
  <pre><code>  //add the recipient list to the message
    msg.addRecipients(Message.RecipientType.TO, recipients);
  
    //set a subject for the message
    msg.setSubject("Test email");
  
    //sets the body of the message
    msg.setContent("This is a test email from my BlackBerry Wireless Handheld");
  
    //sets priority
    msg.setPriority(Message.Priority.HIGH);
  
    //send the message
    Transport.send(msg);
  </code></pre>
  
  <p>}
   catch (Exception me) {
        System.err.println(me);
   }
   }</p>
  
  <p>}</p>