免費 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 電子郵件轉變專案與使用者的溝通,並推動業務成果