adding working send-email function (using sendgrid)