Specifying Per Bearer-Type Download Rules

This tutorial explains how to specify the download rules.

Note: Before specifying the download rules, see Important considerations.

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. Create an instance of the CImSmtpSettings class, and populate it the PopulateDefaultSmtpSettingsL function with required access settings. For example, username, port, email address, password, SMTP authentication, and soon on.

  4. Create an instance of the CImImap4Settings class, and populate it the PopulateDefaultImapSettingsL function with required access settings. For example, username, port, email address, password, SMTP authentication, and soon on.

  5. Create an instance of the CImapSyncDownloadRules class, and populate with required download rules.

  6. Create the associated IMAP accounts in central repository (CenRep) using the appropriate CEmailAccounts::CreateImapAccountL() function, which takes the CImapSyncDownloadRules reference.