Fixes for dependencies, mysql and sending mail