Refactoring mailers and config delayed_job for testing env