added SendGrid code