免费API对于 Web3 项目 - 免费邮箱集成
Web3项目的邮件API
通过用户的钱包邮件地址直接触达他们。从智能合约自动化通知。使用MailBox协议保持通信私密。
免费智能合约集成
// Send email from your smart contract
import { MailerClient } from '@sudobility/contracts';
import { ethers } from 'ethers';
const mailer = new MailerClient(mailerAddress, signer);
// Send notification to user
await mailer.sendPriority(
userWalletAddress,
'Reward Claimed!',
`You received ${rewardAmount} tokens!`
);
为什么Web3项目选择MailBox
传统沟通方式在Web3中力不从心。MailBox提供了缺失的基础设施,实现直接、私密且自动化的用户互动。
营销活动
// Marketing campaign to wallet holders
const campaign = await mailbox.createCampaign({
name: 'Token Launch Announcement',
template: 'product-launch',
targetAudience: 'token-holders',
});
const recipients = await getTokenHolders(contractAddress, {
minBalance: '1000',
});
await campaign.send({
to: recipients,
subject: '🚀 New Token Launch!',
data: {
tokenName: 'AWESOME',
launchDate: '2024-09-01',
bonusPercent: 15,
},
});
// Expected: 10,000+ verified recipients
// Open rate: 85% (vs 20% traditional email)
智能合约
// Solidity smart contract integration
pragma solidity ^0.8.24;
import "@sudobility/contracts/interfaces/IMailer.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract RewardDistributor {
IMailer public immutable mailer;
IERC20 public immutable usdc;
IERC20 public immutable rewardToken;
constructor(
address _mailer,
address _usdc,
address _rewardToken
) {
mailer = IMailer(_mailer);
usdc = IERC20(_usdc);
rewardToken = IERC20(_rewardToken);
}
function distributeReward(
address recipient,
uint256 amount
) external {
// Transfer reward tokens
rewardToken.transfer(recipient, amount);
// Approve USDC for email fee
usdc.approve(address(mailer), 100000);
// Send notification email
mailer.sendPriorityPrepared(
recipient,
"reward-claimed-v1"
);
emit RewardClaimed(recipient, amount);
}
}私信
// Private business communications
const privateChannel = mailbox.createPrivateChannel({
participants: [
'0x1234...5678', // CEO wallet
'0xabcd...efgh', // CTO wallet
'0x9876...5432', // Legal team
],
encryption: 'end-to-end',
retention: '30-days',
});
await privateChannel.sendMessage({
subject: 'Q4 Strategic Planning',
body: `Confidential: Partnership proposal
with major DeFi protocol. Terms:
- $10M strategic investment
- Technical integration timeline
- Regulatory compliance review`,
attachments: ['term-sheet.pdf', 'technical-specs.pdf'],
priority: 'high',
});
适合任何Web3项目
从DeFi协议到NFT市场,MailBox帮助Web3生态系统中的各个项目更有效地触达用户。
DeFi协议
通知用户清算风险、奖励分发、治理投票和协议更新。
NFT市场
向收藏者发送购买确认、竞价通知和独家投放公告。
DAO
私密有效地分发治理提案、投票提醒和成员通信。
游戏项目
提供任务奖励、锦标赛更新和游戏内通知以增强玩家参与度。
几分钟内开始集成
简单的3步集成过程,让您的项目通过邮件与用户通信
1
安装SDK
使用简单的npm install命令将MailBox SDK添加到您的项目中。
2
配置API
设置您的项目凭据并配置您想使用的邮件模板。
3
发送邮件
开始从您的智能合约或后端发送邮件,只需几行代码。
技术特性
⚡
闪电般快速
亚秒级邮件送达
🔒
安全
端到端加密
📊
分析
详细的交付指标
🔄
多链
适用于所有区块链
📧
模板
富文本HTML电子邮件模板
🎯
目标
按钱包活动分段
为什么选择MailBox而不是其他替代品?
| 功能 | 邮箱 | 链上消息 | 传统电子邮件 | Discord/Telegram |
|---|---|---|---|---|
| 隐私 | ✕ | ~ | ||
| 智能合约集成 | ✕ | ✕ | ||
| Gas费用 | 免费 | 高 | 免费 | 免费 |
| 富媒体内容 | ✕ | ~ | ||
| 直达钱包 | ✕ | ✕ |
详细探索每个好处
深入了解Web3邮件如何转变项目与用户之间的沟通,并推动业务成果