Updated Validation and SendMail function

I have added an modified the validation function minor update. The
SendMail now sends emails and removes the Via or host name of the server
once the emails has been sent.