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
| Property | Returns | Description |
|---|---|---|
| contentType | String | MIME content type of the attached file. |
| disposition | 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. |
| emailItem | EmailItem | The email this attachment belongs to. Never null. |
| fileHash | String | Content hash of the attached file, used as the lookup key to retrieve its bytes from the VFS. |
| fileName | String | Original file name of the attachment, as shown to the recipient. |
| id | long | Unique 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.