Tidy up application config, and use SendGrid add-on for mail in production.