Defining the SNAP Preference

This tutorial explains how to define the SNAP preference to be used by an email account.

Required background

Before you configure an email account to support bearer mobility, you have to define the SNAP preference for an email account. To define SNAP preference, complete the following steps:

Procedure

  1. Create an instance of the CEmailAccounts class.

  2. Create an instance of the CImIAPPreferences class to be used by the email service.

  3. Use the CImIAPPreferences::SetSnap() function to specify the SNAP to be used for connections.

  4. Create an instance of the CImSmtpSettings class, and populate with required access settings

  5. Create an instance of the CIm<protocol>Settings class, and populate with required access settings.

    Where, <protocol> is either Imap4 or Pop3.

  6. Create the associated IMAP4, POP3, or SMTP accounts in the central repository using the appropriate CEmailAccounts ::Create<protocol>AccountL() function.

Note: All instances of <protocol> in the preceding steps are either Imap4 , Pop3 , or Smtp .

Result

An instance of one of the derived classes is used with an instance of CImIAPPreferences to configure an email account. These are stored and retrieved from the central repository through the CEmailAccounts ::Save<protocol>SettingsL function.