Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Sending email messages

by Retired ‎02-12-2010 01:47 PM - edited ‎09-17-2010 04:31 PM (6,605 Views)



Write an application that sends email messages.



  • Discover how to send an email message.
  • Discover how to receive an email message.
  • Discover how to use the email server simulator (ESS).


  1. Open email_sample_incomplete.zip
  2. In the IDE, open the email_sample.jdw workspace
  3. Open the EmailSample.java source file.


  1. Add code to _sendItem to complete the following tasks:
    1. retrieve a reference underlying message storage
    2. retrieve a reference to the Sent Items folder
    3. create the message
    4. add the email recipient (retrieve the address that the user entered)
    5. add the subject (retrieve the subject that the user entered)
    6. add the body (retrieve the message text that the user entered)
    7. send the message
    8. reset UI fields to empty
  2. Start the email server simulator in standalone mode.
  3. Start Microsoft Outlook Express.
  4. Build and run the application in the simulator.
  5. Verify that the email message appears in Outlook Express.

Check Your Work


Check out email_sample_complete.zip




In this exercise, you discovered the following things:

  • how to create and send an email message
  • how to use the email server simulator to test email functionality
Users Online
Currently online: 19 members 1,828 guests
Please welcome our newest community members: