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:
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.
// Set POP3 IAP
// new store object allowing access to service entry store
CMsvStore* store = pop3Entry->EditStoreL();
// IAP preferences object restore from service entry store
CImIAPPreferences* prefs = CImIAPPreferences::NewLC();
CCommsDatabase* commsdb = CCommsDatabase::NewL();
CleanupStack::PushL( commsdb );
prefTableView = commsdb->OpenConnectionPrefTableViewOnRankLC(
// Declare a prefTableView Object.
// read the connection preferences
TUint32 iapID = pref.iBearer.iIapId;
choice.iIAP = iapID;
choice.iDialogPref = ECommDbDialogPrefDoNotPrompt;
TInt num = prefs->NumberOfIAPs();
if (num > 0)
CleanupStack::PopAndDestroy( 2 );
Anyone can share your experience?
Anyone know what is the problem?