Please try to log in via the advance set up screen and add your port details behind a colon in line with your incoming and outgoing server addresses. (You can get these details from your email service provider)
Go to Settings > Add Account > IMAP, and tap Show advanced settings then enter your details.
-
Incoming mail server: imap.servername.com:000 (Usually 993 or 143)
-
Outgoing mail server: smtp.servername.com:000 (Usually 465 or 25)
Keep in mind the colon is important.