api.mail

usage()

api.mail.usage() → Promise<Usage>

计划在任何尝试之前都可读到的邮件中提供什么,包括零,这意味着计划根本没有邮件。

freeread it, do not guessquota is the account's
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const usage = await api.mail.usage();
// { pack, mailboxes, maxMailboxes, aliases, hosts, usedBytes, quotaBytes, extraMailboxCredits }

if (!usage.maxMailboxes) {
  // This plan has no mail service. Show the limit, with a link to the plans.
}
usage = api.mail.usage()
# {"pack", "mailboxes", "maxMailboxes", "aliases", "hosts", "usedBytes", "quotaBytes", "extraMailboxCredits"}

if not usage["maxMailboxes"]:
    pass  # This plan has no mail service. Show the limit, with a link to the plans.
packstring

计划

mailboxes · maxMailboxesinteger

有多少存在,以及有多少计划允许。

aliasesinteger

有多少别名地址存在。

hostsinteger

有多少主机已启用邮件 。

usedBytes · quotaBytesinteger

邮件持有的邮件 账户的物件存储.

extraMailboxCreditsinteger

邮箱的价钱是多少

读取零

永远不要试计划的名字

最大邮箱: 0 是这个计划没有邮件的信号, 与最大主机为0的功能相同。 当计划改变时, 读数字的页面会继续工作; 当天计划名称上的页面会保持相同 。

配额不是每个邮箱的

quotaBytes 是一个账户的存储对象,与文件共享,与主机保持在线的任何功能共享。每次都进行重新阅读,这样邮箱就可以满满,因为有其他东西填满。

满满时会发生什么

发送失败时会以重试后的答复拒绝, 所以发送者服务器将再次尝试而不是放弃。 发送副本是例外 : 拒绝后将失去信件已发而未释放的痕迹 。

展示

const u = await api.mail.usage();

if (!u.maxMailboxes) return showPlanLimit();
if (u.mailboxes >= u.maxMailboxes) return showAtLimit(u.extraMailboxCredits);
return showCreateButton();
def mail_screen():
    u = api.mail.usage()
    if not u["maxMailboxes"]:
        return show_plan_limit()
    if u["mailboxes"] >= u["maxMailboxes"]:
        return show_at_limit(u["extraMailboxCredits"])
    return show_create_button()