Validate email addresses, and fail if they are not valid.
Escape user-provided strings in email, to avoid XSS and other injection bugs.
changed the variabel to valid email check from config file
Merge branch 'security_improvements'
Added security updateds made by Erik Froseth