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

New Developer
Posts: 4
Registered: ‎12-01-2008
My Device: Not Specified

Process the email message before it is sent

Hi everyone, 



I need to do a processing of the email mesage before it got sent. My aproach is:


  1. Add custom menu item in the MENUITEM_EMAIL_EDIT repository,
  2. Get the instance of the mail message through an context object passed to this menu item,
  3. Do the processing and
  4. Send the changed message
The problem is with step 4. At the moment my app is sending the changed mail message by Transport.send() method. Email is sent ok but the problem with this is that the message is sent in the background and the user does not have the same experience as with sending the normal emails. Besides i would need to impement additional logic to handle possible errors during the sending process.

Is it possible to add my modified email message to the sending queue of the device and let the BB to do the sending the usual way?

I am using Eclipse plugin with component pack: 4.3.0_4.3.0.13, simulator 8120 and MDS (in standalone mode) from the same pack.
BlackBerry Development Advisor
Posts: 15,759
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Process the email message before it is sent

After you have finished updating the message you can call the Message.updateUi() method.  This will update the user interface of the Messages application and show the user the modified message.  The user can then send the message as they normally would.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker