Fix for mailsetting - bnc#784360 & bnc#791787

* Sending of test email fixed
* Added validation of model
* Some typo and formatting fixed