关于 blink-notifications
用于通过 Blink 发送邮件和短信及管理电话号码的技能,适合需要通知或号码配置的工作流,并提供命令行、SDK 和 MCP 工具。
主要功能
- 01发送 HTML 或纯文本邮件及附件
- 02发送短信
- 03列出、购买和释放电话号码
适用场景
- 01发送带抄送或密送的客户邮件
- 02通过短信发送验证码
- 03为短信或 AI 通话配置号码
MCP 相关
向 MCP 客户端提供发送邮件和短信,以及列出、购买或释放电话号码的工具。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ blink-new/ blink-plugin --skill blink-notifications安装后在 Claude Code 中输入/blink-notifications确认已加载。
详细介绍
快速入门
# Send email
blink notify email [email protected] --subject "Welcome!" --html "<h1>Hello</h1>"
# Send SMS
blink sms send +15551234567 "Your code is 123456"
# List phone numbers
blink phone list
# Buy a phone number
blink phone buy --area-code 415
MCP 工具
| 工具 | 说明 |
|---|---|
blink_notify_email | 发送邮件,支持 HTML/文本、附件、抄送/密送 |
blink_sms_send | 发送短信 |
blink_phone_list | 列出已拥有的电话号码 |
blink_phone_buy | 购买电话号码 |
blink_phone_release | 永久释放电话号码(停止计费) |
邮件
无需设置,Blink 内置此功能。发件地址会自动生成为 noreply@{projectId}.blink-email.com。
const { success, messageId } = await blink.notifications.email({
to: '[email protected]',
subject: 'Order shipped!',
html: '<h1>Your order is on the way</h1>',
text: 'Your order is on the way',
})
完整选项
await blink.notifications.email({
to: ['[email protected]', '[email protected]'],
replyTo: '[email protected]',
cc: '[email protected]',
bcc: '[email protected]',
subject: 'Invoice #12345',
html: '<h2>Invoice Ready</h2><p>See attached.</p>',
text: 'Invoice Ready. See attached.',
attachments: [{
url: 'https://storage.example.com/invoices/12345.pdf',
filename: 'Invoice-12345.pdf',
type: 'application/pdf'
}]
})
邮件选项
| 选项 | 类型 | 必填 | 说明 |
|---|---|---|---|
to | string | string[] | 是 | 收件人 |
subject | string | 是 | 主题行 |
html | string | 是* | HTML 内容 |
text | string | 是* | 纯文本备用内容 |
replyTo | string | 否 | 回复地址 |
cc | string | string[] | 否 | 抄送收件人 |
bcc | string | string[] | 否 | 密送收件人 |
attachments | array | 否 | 文件附件(url + filename) |
*html 或 text 至少需要填写一项(建议两项都填写,以提高送达率)
短信
blink sms send +15551234567 "Your verification code is 847291"
await blink.notifications.sms({
to: '+15551234567',
body: 'Your verification code is 847291'
})
电话号码
AI 通话(参见 blink-ai 技能)和短信都需要电话号码。
# List available numbers
blink phone list
# Buy a number in a specific area code
blink phone buy --area-code 415
# Buy any available number
blink phone buy
最佳实践
- 邮件中始终同时包含 HTML 和文本内容,以提高送达率
- 使用
replyTo,而不要使用自定义的from地址 - 发送前验证邮件格式
- 电话号码使用 E.164 格式——美国号码使用
+1前缀
评论
支持 Markdown