×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    2

    How to set the "Access point in use" for a POP3 mailbox?

    Hi~

    Recently I am developing an email application and I need to programatically create a POP3+SMTP mailbox. I successfully created a POP3+SMTP mailbox with my defined settings, but I failed to set the "access point in use" setting. Thus the mailbox cannot be used once created. I did some search in the forum and find that I can use CImIAPPreferences to set the Internet Access Point for the POP3 entry. Below is the code I used to set the IAP:

    Code:
    // Set POP3 IAP
    // new store object allowing access to service entry store
    CMsvStore* store = pop3Entry->EditStoreL();
    CleanupStack::PushL(store);
    
    // IAP preferences object restore from service entry store
    CImIAPPreferences* prefs = CImIAPPreferences::NewLC();
    prefs->RestoreL(*store);
    
    CCommsDatabase* commsdb = CCommsDatabase::NewL();
    CleanupStack::PushL( commsdb );
    CCommsDbConnectionPrefTableView*
    prefTableView = commsdb->OpenConnectionPrefTableViewOnRankLC(
    ECommDbConnectionDirectionOutgoing, 1);
    prefTableView->GotoFirstRecord();
    
    // Declare a prefTableView Object.
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    
    // read the connection preferences
    prefTableView->ReadConnectionPreferenceL(pref);
    TUint32 iapID = pref.iBearer.iIapId;
    
    TImIAPChoice choice;
    choice.iIAP = iapID;
    choice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
    
    TInt num = prefs->NumberOfIAPs();
    
    if (num > 0) 
    {
    prefs->ReplaceIAPL(0, choice);  
    }
    else 
    {
    prefs->AddIAPL(choice, 0); 
    }
    
    prefs->StoreL(*store);
    
    CleanupStack::PopAndDestroy( 2 );  
    CleanupStack::PopAndDestroy(prefs);
    CleanupStack::PopAndDestroy(store);
    The above codings are written according to the suggestions in the forum. However this did not work and the "access point in use" setting is still contain the value "compulsory" in emulator and "must be defined" in my 6630 mobile.

    Anyone can share your experience?
    Anyone know what is the problem?

    Thanks

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    2

    Re: How to set the "Access point in use" for a POP3 mailbox?

    Well... really nobody has the experience of creating a mailbox programatically? hm... hard to believe...

    Anyway, I found the solution. In order to set the "Access point in use" for a POP3 mailbox, you need to set the CImIAPPreferences for both POP3 and SMTP entry.

    hope this helps...

Similar Threads

  1. Replies: 1
    Last Post: 2006-08-18, 09:03
  2. Replies: 4
    Last Post: 2006-08-17, 10:05
  3. Invalid settings in created Pop3 mailbox
    By nroyer in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-06-20, 10:41
  4. How to set access point in Symbian OS 7.0 emulator
    By squander in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-04-04, 12:22
  5. Set body for an incoming message (POP3)
    By synov in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-05-17, 12:22

Posting Permissions

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