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

Retrieve the default email address for the device

by BlackBerry Development Advisor ‎02-16-2010 12:04 PM - edited ‎02-17-2010 03:45 PM (3,351 Views)


This article applies to the following:

  • BlackBerry® Java™ Development Environment (JDE) 3.6 and later
  • BlackBerry Device Software 3.6 and later


The following code retrieves the default message service email address for the BlackBerry wireless device. The classes used in this example can be found in the package net.rim.blackberry.api mail.

//get the default session

Session session = Session.getDefaultInstance();

If (session != null) {

//now the store

Store store = session.getStore();

//then the service configuration

ServiceConfiguration serviceConfig = store.getServiceConfiguration();

//now get the email address

String emailAddress = serviceConfig.getEmailAddress();


Users Online
Currently online: 18 members 1,412 guests
Please welcome our newest community members: