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
| Property | Returns | Description |
|---|---|---|
| contentId | String | The MIME content ID of this attachment, used to reference it from an inline HTML body (for example a cid: image reference). |
| contentType | 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. |
| disposition | 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. |
| hash | String | The content hash of this attachment, used as the key to fetch its content from the VFS blob and hash stores. |
| inputStream | 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. |
| name | String | The 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.