Here’s how to send an email through Sendgrid using Curl.
curl --request POST \
--url https://api.sendgrid.com/v3/mail/send \
--header "Authorization: Bearer $SENDGRID" \
--header 'Content-Type: application/json' \
--data '{"personalizations": [{"to": [{"email": "you@example.com"}]}],"from": {"email": "you@example.com"},"subject": "Sending with SendGrid is Fun","content": [{"type": "text/plain", "value": "and easy to do anywhere, even with cURL"}]}'
Sendgrid has a free plan that allows you to send up to 100 email messages pers day. Once you become a subscriber you can send up to 50k email messages for $19.95 per month.
Get battle-tested dev tips, terminal wizardry, and practical Mac hacks from a veteran engineer who speaks your language. Subscribe now and power up your toolkit—no fluff, just real code magic.
JoelDare.com © Dare Companies Dotcom LLC