Developers
Local Navigation
Exercise
Write an application that sends email messages.
Objectives
- Discover how to send an email message.
- Discover how to receive an email message.
- Discover how to use the email server simulator (ESS).
Setup
- Download the file (ZIP)
- In the IDE, open the email_sample.jdw workspace
- Open the EmailSample.java source file.
Tasks
- Add code to _sendItem to complete the following tasks:
- retrieve a reference underlying message storage
- retrieve a reference to the Sent Items folder
- create the message
- add the email recipient (retrieve the address that the user entered)
- add the subject (retrieve the subject that the user entered)
- add the body (retrieve the message text that the user entered)
- send the message
- reset UI fields to empty
- Start the email server simulator in standalone mode.
- Start Microsoft Outlook Express.
- Build and run the application in the simulator.
- Verify that the email message appears in Outlook Express.
Check Your Work
Download the completed code (ZIP)
Review
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
Additional Resources
Go to the next exercise in “Connecting to Email, Calendar and PIM Applications on BlackBerry”, Using PIM functions