EmailController refactored. Settings started.

Tidied up my email controller and got the logic into a class of it's
own. Adding application settings to change the smtp info from the admin
settings. Now displaying email logs too.