api.mail

create()

api.mail.create({ address, name }) → Promise<Mailbox>

Crea un buxbox su un host habilitat. La quota viene del plan, mai del llamante.

POST /api/mailhost must be enabledquota from the plan
Using Python?

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

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"
addressstringobrigatório

L'indirizzo completo. Il suo host deve essere un onde il mail è activat.

namestring

Il nome display.

Il host deve essere activat prima

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")

Il renegazione nomes l'host che manca, quindi la correzione è un appell a distant.

Il chi lo chiama non scelse la quota

Proveniente del plan, e è il stoccaggio de objetos del cont

Una caixa de postas non ha spazio per sé. quotaBytes è del conto, let fresca ogni volta — e è il motivo per cui una caixa de postas se riempie quando un host dispiega algo o un storage s'implena.

Erros

CódigoStatusQuando
mail_not_enabled403Il host non ha ancora records mail.
mail_not_in_plan403Il plan non ha servizio postal.
address_taken409L'indirizzo, o un pseudonyme di esso, existe.
address_reserved400Un nome del dominius deve rispondere.

- O que segue

update() para una foto e una firma, aliases.add() para altre adresses que aterrescono aqui, forward() para copias ailleurs.