A single file attached to an EmailItem, referencing the file's content by hash rather than storing it directly on the entity. The actual file bytes are held in the VFS, keyed by the file hash; this record only carries the attachment's metadata (file name, content type and disposition) and its link back to the owning email.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
contentTypeStringMIME content type of the attached file.
dispositionStringHow the attachment is presented in the email, for example INLINE for content referenced from the message body, or ATTACHMENT for a regular file attachment.
emailItemEmailItemThe email this attachment belongs to. Never null.
fileHashStringContent hash of the attached file, used as the lookup key to retrieve its bytes from the VFS.
fileNameStringOriginal file name of the attachment, as shown to the recipient.
idlongUnique database identifier for this attachment.

Methods

getId()

Returns: long

Unique database identifier for this attachment.

getEmailItem()

Returns: EmailItem

The email this attachment belongs to. Never null.

getFileHash()

Returns: String

Content hash of the attached file, used as the lookup key to retrieve its bytes from the VFS.

getFileName()

Returns: String

Original file name of the attachment, as shown to the recipient.

getContentType()

Returns: String

MIME content type of the attached file.

getDisposition()

Returns: String

How the attachment is presented in the email, for example INLINE for content referenced from the message body, or ATTACHMENT for a regular file attachment.

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