Added mail sending.
Improved input checks.