Skip to content

Instantly share code, notes, and snippets.

@mohitt
Created October 2, 2019 16:14
Show Gist options
  • Select an option

  • Save mohitt/392abebd6829bd613ee701d9810f93a2 to your computer and use it in GitHub Desktop.

Select an option

Save mohitt/392abebd6829bd613ee701d9810f93a2 to your computer and use it in GitHub Desktop.
export SENDGRID_API_KEY='YOUR_API_KEY'
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer $SENDGRID_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"personalizations": [{"to": [{"email": "[email protected]"}]}],"from": {"email": "[email protected]"},"subject": "Sending with SendGrid is Fun","content": [{"type": "text/plain", "value": "and easy to do anywhere, even with cURL"}]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment