sendGrid skeleton & refactoring