E
extension-email
by @caffeinelabsv
4.6(120)
此技能支持从后端发送服务性/事务性邮件,如订单确认和通知。它提供了一个简化的接口,帮助开发者轻松集成邮件发送功能,确保关键信息及时触达用户,提升用户体验和系统可靠性。
安装方式
npx skills add https://github.com/caffeinelabs/skills --skill extension-emailcompare_arrows
Before / After 效果对比
1 组使用前
在没有这个技能之前,开发者需要手动集成第三方邮件服务,编写大量代码处理 API 调用、错误处理和收件人管理,这不仅耗时,还容易引入错误,延缓了功能上线。
使用后
该 Skill 提供了一个简洁的接口,开发者只需调用一个函数即可发送服务性邮件,极大地简化了集成过程,减少了开发工作量和潜在错误,加速了功能部署。
SKILL.md
Email — Service/Transactional
Service/transactional email extension for Caffeine AI.
Overview
This skill adds support for sending service and transactional emails from the backend canister. Use sendServiceEmail for order confirmations, notifications, and similar one-off emails.
Backend
This component is for sending service/transactional emails.
There is the prefabricated module mo:caffeineai-email/emailClient.mo which cannot be modified.
- Use the sendServiceEmail function.
- Each recipient is sent an individual email
- It returns a SendResult which is #ok if the email is sent successfully otherwise #err(error) with the error text.
module {
public type SendResult = {
#ok;
#err : Text;
};
public func sendServiceEmail(
fromUsername : Text,
recipients : [Text],
subject : Text,
htmlBody : Text,
) : async SendResult;
};
Usage for sendServiceEmail:
import Runtime "mo:core/Runtime";
import EmailClient "mo:caffeineai-email/emailClient";
actor {
public func sendOrderConfirmationEmail(recipientEmailAddress : Text, username : Text, orderReference : Text) : async () {
let result = await EmailClient.sendServiceEmail(
"no-reply",
[recipientEmailAddress],
"Order " # orderReference # " confirmed",
"Hello " # username # ",\nYour order " # orderReference # " has been confirmed. Your items will ship tomorrow.",
);
switch (result) {
case (#ok) {};
case (#err(error)) {
Runtime.trap("Failed to send order confirmation email: " # error);
};
};
};
};
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量27.5K
评分4.6 / 5.0
版本
更新日期2026年10月23日
对比案例1 组
用户评分
4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%
为此 Skill 评分
0.0
兼容平台
🤖claude-code
时间线
创建2026年6月25日
最后更新2026年10月23日