First functionality of the plugin. It works adding the $db_threshold and $to_email values in the .php