fixed sendgrid config bugs