BlackBerry Device Applications Integration Guide
Reply to a message
Task
Reply to an existing message.
22
Steps
Session.getTransport()
1. Invoke
Transport
Transport
. The
Transport trans = Session.getTransport();
Message.reply(Boolean)
>
Invoke
to reply to only the sender.
Store store = Session.waitForDefaultSession().getStore();
Folder[] folders = store.list(INBOX);
Folder inbox = folders[0];
Message[] messages = inbox.getMessages();
if( messages.length > 0 ) {
Message msg = messages[0];
}
Message reply = msg.reply(true);
trans.send(reply);
and store the returned object in a variable of type
object represents the messaging transport protocol.
and specify true to reply to all message recipients or false