1. inv2004's Avatar
    Hello,

    I started developing of the BB application, and would like to use native mail client to work with messages from my application.

    The process of message creation is simple:

    Code:
    ServiceBook sb = ServiceBook.getSB();
    ServiceRecord[] sr = sb.findRecordsByName("Email"); // There is only one Email [CMIME] record in SB.
    
    if(1 != sr.length) { throw new NoSuchServiceException; }
    
    Session session = Session.getDefaultInstance(new ServiceConfiguration(sr[0]));
    Store store = session.getStore();
    Folder folder = store.getFolder(Folder.INBOX); // is it neccessary to use separate folder ?
    
    Message msg = new Message(folder);
    msg.setFrom(new Address("[email protected]", "My Name"));
    msg.setSubject("Test Subject");
    msg.setInbound(true);
    msg.setStatus(Message.Status.RX_RECEIVED, 0)
    folder.appendMessage(msg);
    And now I have a new message, but if I scroll up I see the top string is:
    "Received using: Unknown". There is no Reply menu item for this message also.

    The other messages is "Received using: EMail".

    I also tried Invoke.invokeApplication( Invoke.APP_TYPE_MESSAGES, msg), but the result is the same.

    Could you please clarify where is the problem? what does this message mean, and what is the best way to fix this problem?

    Thank you.

    My BB is pearl flip 8220, without BB plan.
    12-15-09 02:39 AM
LINK TO POST COPIED TO CLIPBOARD