Skip to content

Instantly share code, notes, and snippets.

@icarrr
Created November 20, 2019 15:36
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 icarrr/d1b4d6189583c1359fd7b967d8739ec9 to your computer and use it in GitHub Desktop.
Save icarrr/d1b4d6189583c1359fd7b967d8739ec9 to your computer and use it in GitHub Desktop.
Test send mail via API Sendgrid using curl
curl --request POST --url https://api.sendgrid.com/v3/mail/send \
--header 'authorization: Bearer API_KEY' \
--header 'content-type: application/json' \
--data '{"personalizations":[{"to":[{"email":"update me!", "name":"Orang Ganteng"}],"subject":"Hello!"}],"content": [{"type": "text/plain", "value": "Nice Works"}],"from":{"email":"sendgrid@localhost","name":"Sendgrid"}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment