const box = await api.mail.create({ address: "hello@example.com", name: "Hello" });
box.address; // "hello@example.com"
box.host; // "example.com"
box.local; // "hello"box = api.mail.create(address="hello@example.com", name="Hello")
box.address # "hello@example.com"
box.host # "example.com"
box.local # "hello"addressstring必填完整地址。 其主机必须是启用邮件的地址 。
namestring显示名称 。
必须先启用主机
import { IaGenifyError } from "iagenify";
try {
await api.mail.create({ address: "hello@team.example.com" });
} catch (err) {
if (err instanceof IaGenifyError && err.code === "mail_not_enabled") {
await domain.mail.enable({ subdomain: "team" });
}
}from iagenify import IaGenifyError
try:
api.mail.create(address="hello@team.example.com")
except IaGenifyError as error:
if error.code != "mail_not_enabled":
raise
domain.mail.enable(subdomain="team")拒绝者的名字 缺少主机, 所以,固定是 一次呼叫。
打电话者不选择配额
是从计划里出来的,是账户的物品存储
邮箱没有自己的空间。 配额Bytes是账户的, 每次阅读都是新鲜的, 这就是为什么当主机部署某东西或储存充满时邮箱会更充实。
错误
| 代码 | 状态 | 触发条件 |
|---|---|---|
| mail_not_enabled | 403 | 主机还没有邮件记录 。 |
| mail_not_in_plan | 403 | 该计划没有邮件服务。 |
| address_taken | 409 | 地址或别名存在 |
| address_reserved | 400 | 域名要回答 。 |
内容如下
(更新) 图片和签名, aliases.add() 以其他地址 这片土地在这里, (前) 另请注明副本。