A single email attachment captured from an incoming message, with its content stored in the VFS blob store and indexed by hash. A developer's store-mail callback reads getHash to fetch the attachment content from the VFS, or calls getInputStream to read it directly.

Implements: Attachment


Properties

PropertyReturnsDescription
contentIdStringThe MIME content ID of this attachment, used to reference it from an inline HTML body (for example a cid: image reference).
contentTypeStringThe MIME content type of this attachment, as parsed from the message. Defaults to application/octet-stream if the message did not specify one.
dispositionStringThe content disposition of this attachment, as parsed from the message. Defaults to the standard attachment disposition if the message did not specify one.
hashStringThe content hash of this attachment, used as the key to fetch its content from the VFS blob and hash stores.
inputStreamInputStreamReads the attachment content from the VFS blob store, combining its hash-split parts, and returns it as a stream. Each call re-reads and re-combines the content.
nameStringThe original file name of this attachment, as parsed from the MIME message.

Methods

getName()

Returns: String

The original file name of this attachment, as parsed from the MIME message.

getHash()

Returns: String

The content hash of this attachment, used as the key to fetch its content from the VFS blob and hash stores.

getInputStream()

Returns: InputStream

Reads the attachment content from the VFS blob store, combining its hash-split parts, and returns it as a stream. Each call re-reads and re-combines the content.

size()

Returns: int

The size of this attachment in bytes.

getContentId()

Returns: String

The MIME content ID of this attachment, used to reference it from an inline HTML body (for example a cid: image reference).

getContentType()

Returns: String

The MIME content type of this attachment, as parsed from the message. Defaults to application/octet-stream if the message did not specify one.

getDisposition()

Returns: String

The content disposition of this attachment, as parsed from the message. Defaults to the standard attachment disposition if the message did not specify one.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.