Changed sendmail.php to use moodle require_params() function instead of $_POST superglobal.