Sby SendGrid
Send an email
Sends an email from a verified sender, with up to 1,000 personalizations that each set their own recipients.
Description
Each object in `personalizations` is one envelope: its recipients and how their message is handled. On the CLI, `twilio email:set` saves a default sender and subject, and `twilio email:send` takes `--to`, `--text`, `--subject`, `--from` and `--attachment`.
send-email.md
Send an email
Sends an email from a verified sender, with up to 1,000 personalizations that each set their own recipients.
Each object in personalizations is one envelope: its recipients and how
their message is handled. On the CLI, twilio email:set saves a default
sender and subject, and twilio email:send takes --to, --text,
--subject, --from and --attachment.
Set up
Use the first option your agent supports.
CLI (official)
Install the command, then confirm it runs.
brew tap twilio/brew && brew install twilio
twilio --version
Run twilio email:send.
Set $SENDGRID_API_KEY in your environment first (get a key: https://app.sendgrid.com/settings/api_keys).
API (official)
- Base URL: https://api.sendgrid.com
- Endpoint:
POST /v3/mail/send - Auth: send the header
Authorization: Bearer $SENDGRID_API_KEY - Get a key: https://app.sendgrid.com/settings/api_keys
- Docs: https://www.twilio.com/docs/sendgrid/api-reference
Before doing anything else, make one read-only call to confirm access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
Built from these files in the repository
The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.