"Cannot Verify Server Identity" message from iPhone

For most of iOS versions, you can click "Details" below that message, followed by "Trust" in the top-right corner to solve the problem. If your iPhone do not show the "Trust" option please try the following instructions.

A. Update your iOS to the latest version.
B. Turn off SSL in your iPhone Mail account
     1.) Log into your iOS device.
     2.) Go to Settings then tap on Mail.
     3.) Tap on Accounts.
     4.) Click on the email account to select it
     5.) Click on label for your mail account again - it will be above the Mail and Notes icon
     6.) Click on Advanced
     7.) Click on the slider that is labeled Use SSL. It should not be marked as green.
     8.) Click in the top left corner where it says Account.
     9.) In the top right corner click on Done.
C. Turn on SSL option again.
    1.) repeat above step 1-9. in #7 mark the SSL option as green/on.
    2.) after click "Done" in step #9. it will show the message "Cannot Verify Server Identity" with option "Continue". Please choose it.

The iPhone should be now trust the email server SSL certificate and solve the problem.