Open the Account preferences
In the Mail menu go to Preferences… to open the Preferences dialog. Choose Accounts in the top to reacht the accounts section of the preferences.
Enable encryption for the incoming server
Select the account in the list to the right. Continue to the advanced settings by clicking to the Advanced tab. Ensure that Use SSL is activated. Apple Mail may change the Port to 993 for IMAP or 995 for POP. This is fine and has not to be reverted.
Enable encryption for the outgoing server
Go to the Account information tab. In the drop-down for Outgoing Mail Server (SMTP) choose the Edit SMTP Server List… entry to open the edit dialog.
Choose the smtp.nine.ch entry in the top list. Ensure that Use SSL is activated and the Port is set to 587. Click OK to save your changed settings.