Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How can I tell if a messaging module (MTM) is connected?

From Wiki
Jump to: navigation, search

Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (20 Aug 2007)
Last edited: hamishwillee (14 Jun 2012)


How can I tell if a messaging module (MTM) is connected?


Examine via the messaging server to find out whether an MTM is used or not.
Normally client applications do not need to know whether an MTM module is connected to the server or not. The server automatically loads and unloads them when needed, and there is no direct function for inquiring such information. However, you can use the CClientMtmRegistry class to inquire if an MTM module is used or not. This would be the same as if an MTM is connected to the server or not.


First, open a client session with the message server:
CMsvSession* session = CMsvSession::OpenAsyncL(*this);
Then create an object of the CClientMtmRegistry class:
CClientMtmRegistry* mtmReg;
mtmReg = CClientMtmRegistry::NewL(*session);
/* list of known MTM Uid

  • /
    if (mtmReg->IsPresent(KUidMsgTypePOP3))
    // POP3 MTM is present
    if (mtmReg->IsInUse(KUidMsgTypePOP3))
    // POP3 MTM is in use
    If the UID of an MTM is unknown, run the following loop to get it.
    TInt mtmCount = mtmReg->NumRegisteredMtmDlls();
    for (TInt i=0; i<mtmCount; i++)
        TUid mtmUid = mtmReg->MtmTypeUid(i);
        const CMtmDllInfo* mtmInfo;
        mtmInfo = &(iMtmReg->RegisteredMtmDllInfo(mtmUid));
        TBuf8<256> info;
This page was last modified on 14 June 2012, at 06:04.
24 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.