/send-email-function

Cosmic Function to send emails using SendGrid

Primary LanguageJavaScript

SendGrid Email Function

Cosmic Function that enables you to send emails using SendGrid.

Deploying the Function

  1. Login to Cosmic JS and go to Your Bucket > Settings > Functions
  2. Install the SendGrid Email Function
  3. Add your SENDGRID_API_KEY environment variable.
  4. Deploy the function and get your endpoint

Testing the Endpoint

You can use Postman to test the endpoint with the following POST variables:

to,from,subject,text_body, and html_body

Maintainence

That's it! No managing or maintaining a server, just code and deploy!