This tutorial explains how to configure an IMAP, POP or SMTP email account to specify domain name for validation when connecting to a server using secure TLS or SSL sockets.
To enhance the certification-security checks when connecting to a destination network, you must connect an IMAP, POP or SMTP email account to a server over TLS or SSL, and validate the domain name in the received certificate against a domain name specified in the email account settings. If no domain name is specified (configured) in the email account settings, then validate the domain name in the received certificate against the address of the server being connected to.
Create an instance of the CEmailAccounts class.
Create an instance of the CImIAPPreferences class to be used by the email service.
Create an instance of the CIm<protocol>Settings class.
Where, <protocol> is either Imap4, Pop3, or Smtp.
Populate the CImIAPPreferences class and the CIm<protocol>Settings class from central repository (CenRep) using CEmailAccounts ::Load<protocol>IapSettingsL function.
Use the CIm<protocol>Settings:: SetTlsSslDomainL() , function to specify the appropriate domain name.
Store the updated settings classes to CenRep using the CEmailAccounts ::Save<protocol>IapSettingsL function.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.