Skip to main content
Receiving endpoints are exposed through the PauboxReceiving class. Pass your Email API key to the constructor, or omit it to read PAUBOX_API_KEY from the environment. Methods return decoded JSON objects (stdClass).

Domains

List domains

Create a domain

Pass null to auto-generate a slug.

Get a domain

Delete a domain

Mailboxes

List mailboxes

Create a mailbox

Pass a fourth argument for quotaBytes.

Get a mailbox

Delete a mailbox

Emails

List received emails

The array also accepts after and before cursors for pagination, and search.

Get a received email

Download an attachment

downloadAttachment returns the raw file bytes as a string.

Error handling

A non-2xx response throws Paubox\Receiving\PauboxReceivingException, which provides getStatusCode(), getUrl(), and getResponseBody(). It is also thrown when no API key is set.