Skip to content

Instantly share code, notes, and snippets.

@sendgrid-gists
Last active June 15, 2017 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendgrid-gists/c3cb8c2d4b4142ac5ca4e611f15d99d3 to your computer and use it in GitHub Desktop.
Save sendgrid-gists/c3cb8c2d4b4142ac5ca4e611f15d99d3 to your computer and use it in GitHub Desktop.
v3 "Hello World" for email, using SendGrid with cURL.
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": "test@example.com"}]}],"from": {"email": "test@example.com"},"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