Refactored a bit - and disabling sendmail