diff -r ecf6a73a9186 -r 60a8a215b0ec email/pop3andsmtpmtm/servermtmutils/src/imutcon.cpp --- a/email/pop3andsmtpmtm/servermtmutils/src/imutcon.cpp Tue Oct 05 13:58:47 2010 +0530 +++ b/email/pop3andsmtpmtm/servermtmutils/src/imutcon.cpp Tue Oct 19 11:30:16 2010 +0530 @@ -17,7 +17,9 @@ #include #include -#include +#include +#include + #include #include // For TConnectionInfo #include @@ -95,14 +97,36 @@ void CImConnect::ConnectWithSNAP() { - TConnSnapPref snapPref(iIAPPreferences.SNAPPreference()); - iConn.Start(snapPref, iStatus); + // Create connection preferences + TConnPrefList prefList; + TExtendedConnPref prefs; + + prefs.SetSnapPurpose( CMManager::ESnapPurposeInternet ); + if(iIsSilentConn) + { + prefs.SetNoteBehaviour( TExtendedConnPref::ENoteBehaviourConnSilent ); + } + prefs.SetSnapId(iIAPPreferences.SNAPPreference()); + prefList.AppendL( &prefs ); + + // Start a connection with connection preferences + iConn.Start( prefList, iStatus ); } void CImConnect::ConnectWithIAPListL() { TInt iapCount=iIAPPreferences.NumberOfIAPs(); + // Create connection preferences + TConnPrefList prefList; + TExtendedConnPref prefs; + prefs.SetSnapPurpose( CMManager::ESnapPurposeInternet ); + if(iIsSilentConn) + { + prefs.SetNoteBehaviour( TExtendedConnPref::ENoteBehaviourConnSilent ); + } + + if(iapCount==0) { #ifdef __IMSK_LOGGING @@ -112,7 +136,9 @@ iTextSession->LogText(KImConDefault); } #endif - iConn.Start(iStatus); + prefList.AppendL( &prefs ); + // Start a connection with connection preferences + iConn.Start( prefList, iStatus ); } else { @@ -141,32 +167,11 @@ } #endif - TInt rank=1; -#ifdef __IMSK_SIMULATION - for(TInt i=iIAPsToFail;i