×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Angry CBaseMtm::AddresseeList() returns empty recipients list

    I'm new here, so I want to say hello to everybody before I start asking a questions
    The code I'm using is based on the S60_Platform_POP_IMAP_Example_v1_1.
    If I compile and install this exaple it works fine ("To:" and "CC:" reciepients are shown by this example application).
    My code looks similar, but I'm not using CBaseMtmUi class to show emails on GUI - I just need to read this information to send it out via BT.

    Code:
    // here I get the pop3 email MsvEntry 
    CMsvEntry* MsvEntry = iModel->GetMsvEntryL(EmailIndex);
    
    // I can read correct information about timestamp, 
    // subject and sender of the email message
    TTime Timestamp = MsvEntry->Entry().iDate;
    TPtrC Subject = MsvEntry->Entry().iDescription;
    TPtrC SenderName = MsvEntry->Entry().iDetails;
    
    // then I create pop3 mtm
    CPop3ClientMtm* Pop3Mtm = static_cast<CPop3ClientMtm*>iModel->iClientReg->NewMtmL(KUidMsgTypePOP3));
    CleanupStack::PushL(Pop3Mtm);
    
    Pop3Mtm->SwitchCurrentEntryL(MsvEntry->EntryId());
    Pop3Mtm->LoadMessageL();
    
    if (MsvEntry->HasStoreL()) {
    	CRichText& RichText = Pop3Mtm->Body();
    	// here I can access the body of the email
    } else {
    	//email has not been retrived from the server yet!
    }
    
    // the problem appears here: the following code always returns zero count...
    // recipients list is empty and I have no clue what's wrong...
    Pop3Mtm->AddresseeList().Count());
    
    CleanupStack::PopAndDestroy(Pop3Mtm);
    It seems to me I just need to do something additional than LoadMessageL(), or read it (recipients) in completely diferent way - CBaseMtmUi class is able to do it somehow using similar way (using CPop3ClientMtm as a source)
    Any hint how to solve this problem will be appreciated.
    Best regards,
    --
    Jakub

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: CBaseMtm::AddresseeList() returns empty recipients list

    Hi,

    I am not sure if switchCurrentEntry is the right approach to use the api.

    Try using SetEntry instead.

    Let me know if it works.

    Regards
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Re: CBaseMtm::AddresseeList() returns empty recipients list

    I've tried it already, before I asked a question, but ok - I've just tested it once more - unfortunatelly it does not work too...
    The AddresseeList is still empty, additionaly the code leaves on Pop3Mtm->SetCurrentEntryL(MsvEntry) while attempting to get second email from the list (which is also strange for me - the Pop3Mtm is created and destroyed in this function, so I do not understand why it leaves on 2nd attempt...)
    Regards,
    --
    JK

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Thumbs up Re: CBaseMtm::AddresseeList() returns empty recipients list

    OK, I've found the problem - it's possible to access to To: CC: lists using following way:
    Code:
    if (MsvEntry->HasStoreL()) {
    	CMsvStore *MsvStore = MsvEntry->ReadStoreL();
    	CleanupStack::PushL(MsvStore);
    
    	CImHeader *ImHeader = CImHeader::NewLC();
    	ImHeader->RestoreL(*MsvStore);
    
    	// here you can get the correct lists...
    	TInt ToCount = ImHeader->ToRecipients().MdcaCount(); /** Quantity of email recipients in "To" field
    	TInt CcCount = ImHeader->CcRecipients().MdcaCount(); /** Quantity of email recipients in "CC" field */
    	CleanupStack::PopAndDestroy(ImHeader);
    	CleanupStack::PopAndDestroy(MsvStore);
    }

Similar Threads

  1. ExampleClientEngine ...
    By GeKI in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2005-12-16, 07:12
  2. Replies: 0
    Last Post: 2005-09-02, 14:03
  3. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52
  4. AT+CSCA? returns empty string with 6210?
    By kesslerdesign in forum General Messaging
    Replies: 1
    Last Post: 1970-01-01, 02:00
  5. AT+CSCA? returns empty string with 6210?
    By kesslerdesign in forum General Messaging
    Replies: 2
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×