send-email
Use when sending simple transactional emails or notifications via the SendGrid v3 Mail Send API.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- send-email
- description
- Use when sending simple transactional emails or notifications via the SendGrid v3 Mail Send API.
02 资源文件 3
- 参考文档references/best-practices.md1.2 KB
- 参考文档references/installation.md1.5 KB
- 参考文档references/single-email-examples.md2.9 KB
03 SKILL.md 正文
Send Email with SendGrid
Overview
SendGrid provides a single Mail Send endpoint for sending email via the v3 API. The Node SDK (@sendgrid/mail) is the recommended integration for JavaScript/TypeScript.
Use this skill when:
- Sending transactional emails (welcome, password reset, receipts)
- Sending simple notifications
- You need basic text/HTML emails with optional attachments
Quick Start
- Detect project language (package.json, requirements.txt, go.mod, etc.)
- Install SDK (preferred) or use cURL - See references/installation.md
- Prepare message with
from,to,subject, andtextorhtml - Send and handle errors (retry on 429/5xx)
Required Parameters
| Parameter | Type | Description |
|---|---|---|
from |
string | Sender email (must be verified) |
to |
string or string[] | Recipient email(s) |
subject |
string | Email subject |
text or html |
string | Email body content |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
cc |
string or string[] | CC recipients |
bcc |
string or string[] | BCC recipients |
reply_to |
string | Reply-to address |
attachments |
array | Base64-encoded attachments |
template_id |
string | Dynamic template ID (if using templates) |
dynamic_template_data |
object | Template data (if using templates) |
Minimal Example (Node.js)
import sgMail from '@sendgrid/mail';
sgMail.setApiKey(process.env.SENDGRID_API_KEY!);
await sgMail.send({
from: 'Support <support@winkintel.com>',
to: 'vince@winkintel.com',
subject: 'Hello from SendGrid',
text: 'This is a test email.',
html: '<p>This is a test email.</p>',
});
Templates (Dynamic Templates)
If using SendGrid Dynamic Templates, supply template_id and dynamic_template_data instead of html/text.
await sgMail.send({
from: 'Support <support@winkintel.com>',
to: 'vince@winkintel.com',
templateId: 'd-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
dynamicTemplateData: { first_name: 'Vince' },
});
Best Practices (Short)
- Always set both
textandhtmlwhen possible (deliverability + accessibility). - Retry only on 429 or 5xx errors with exponential backoff.
- Use verified senders; unverified domains will fail.
- Avoid fake addresses at real providers; test with addresses you control.
For deeper details, see:
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.