1. 向导创建的域名
首次启动向导会为超级管理员地址所属的域名(例如 example.com)创建域名及其 DKIM 密钥。打开管理 › 域名与 DNS,发布标记为“必填”的记录,然后等待每条记录变为绿色。出站 25 端口也会在这里进行测试。
其他邮箱域名(other-brand.com)可在域名与 DNS › 添加域名 › 邮件域名中添加:每个域名都有自己的 DKIM 密钥和记录,共用同一台服务器和同一个主机名。新添加的域名只有在验证通过后(或点击“立即向地址开放”后),才会出现在可选地址中,API 也才会接受以它作为 from。
2. 团队成员的账户
在管理 › 用户中,通过邮件或链接邀请您的同事。每个人设置自己的密码,然后可以开启两步验证、通行密钥和应用专用密码(用于桌面和手机应用)。管理员负责设置每个账户的角色和磁盘空间。
邮件应用:IMAP mail.example.com:993(TLS),SMTP mail.example.com:465(TLS;587 端口暂未提供服务),用户名为完整邮箱地址,密码为应用专用密码。
3. 共享邮箱(可选)
contact@ 或 support@ 可以创建为共享邮箱:每位成员只会收到规则分配给自己的邮件。
4. API 密钥
密钥分为两种(详情):
- 应用密钥:由管理员在管理 › API 密钥中创建,适用于一个或多个域名,权限为
sending_access(发送)或full_access(全部); - 个人密钥:由每位用户在开发者(账户菜单)中创建,用于从自己的地址发送邮件。
5. 第一封邮件
cURL
curl https://mail.example.com/api/v1/emails \
-H "Authorization: Bearer $VOAARO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <notifications@example.com>",
"to": ["client@example.org"],
"subject": "Welcome",
"html": "<p>Your account is ready.</p>"
}'Node / Bun
import { Voaaro } from "@deveryidea/voaaro"
const voaaro = new Voaaro(process.env.VOAARO_API_KEY, { baseUrl: "https://mail.example.com" })
const { data, error } = await voaaro.emails.send({
from: "Acme <notifications@example.com>",
to: ["client@example.org"],
subject: "Welcome",
html: "<p>Your account is ready.</p>",
})Python
import voaaro
voaaro.api_key = os.environ["VOAARO_API_KEY"]
voaaro.base_url = "https://mail.example.com"
email = voaaro.Emails.send({
"from": "Acme <notifications@example.com>",
"to": ["client@example.org"],
"subject": "Welcome",
"html": "<p>Your account is ready.</p>",
})PHP
use Voaaro\Voaaro;
$voaaro = Voaaro::client(getenv('VOAARO_API_KEY'), baseUrl: 'https://mail.example.com');
$email = $voaaro->emails->send([
'from' => 'Acme <notifications@example.com>',
'to' => ['client@example.org'],
'subject' => 'Welcome',
'html' => '<p>Your account is ready.</p>',
]);Go
client := voaaro.NewClient(os.Getenv("VOAARO_API_KEY"),
voaaro.WithBaseURL("https://mail.example.com"))
sent, err := client.Emails.Send(&voaaro.SendEmailRequest{
From: "Acme <notifications@example.com>",
To: []string{"client@example.org"},
Subject: "Welcome",
Html: "<p>Your account is ready.</p>",
})响应中会返回邮件 ID:{"id": "…", "suppressed": []}。您可以在管理 › 发送日志中、通过 GET /api/v1/emails/{id} 或通过 webhook 跟踪它的状态变化(已接受、已发送、已送达)。
下一步:正式部署(备份、更新、监控)。