Skip to the page

Retrieve received email

One received email with its text, its HTML and the names of its attachments. A test key may not read it.

opensend inbound get <id>
Needs the scopeemails:read
Only reads

Flags

  • <id>stringRequired

    The id of the item. Up to 64 characters.

Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. Output and scripts lists the codes.

  • object"inbound_email"

    Always inbound_email.

  • idstring

    The id of the received email.

  • fromstring

    The address it came from.

  • fromNamestring | null

    The name of the sender, or null when the message gave none.

  • tostring

    The address it was sent to, on one of your domains.

  • subjectstring

    The subject line.

  • domainstring

    The domain of yours that received it.

  • spamboolean

    Whether it was judged to be spam.

  • sizeinteger

    The size of the whole message in bytes.

  • attachmentsinteger

    How many files were attached.

  • createdAtstring

    When it arrived.

  • textstring | null

    The message as plain text, or null.

  • htmlstring | null

    The message as HTML, or null.

  • truncatedboolean

    Whether the message was too long to keep whole.

  • messageIdstring

    The Message-ID header of the message.

  • filesobject[]

    The attached files. Their content is not kept.

  • files[].filenamestring

    The name of the file.

  • files[].mimeTypestring

    The media type of the file.

  • files[].sizeinteger

    The size of the file in bytes.