The SME Server is a Linux distribution that sets up a server providing email, file sharing and authentication services. When used as a mail server, it provides SMTP and IMAP mail services over SSL.
Connecting an iPhone to this server involves a couple of unintuitive steps, which are documented here:
When it [erroneously IMO] fails to connect to the server using SSL, and asks if you want to connect to the server without SSL, you need to answer “yes”. This is the only way to break out of the setup endless loop. Then you can go back in and switch SSL on and update the SMTP ports.