Represents a single email message: an outbound send that is queued, retrying, completed or failed, or an inbound email received into a profile's internal inbox when a recipient profile is set. An email item may be linked to a BaseEmailJob for a bulk send, generated by an EmailTrigger, or created individually for a one-off notification. It tracks delivery status and retry attempts, read and click tracking used for engagement reporting, and any attachments via EmailAttachment.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
attachmentsList<EmailAttachment>The files attached to this email.
bccListStringThe bcc recipient addresses for this email, as a single delimited string.
ccListStringThe cc recipient addresses for this email, as a single delimited string.
clusterVersionStringIdentifies which server cluster is responsible for sending this email item.
contentLanguageStringThe content language of the email body.
contentStorageTypeStringIdentifies where this email's body content is stored. Null means the html and text fields hold the content directly, otherwise this is an identifier telling EmailContentService which external store to use.
createdDateDateThe date and time this email item was created.
dispositionStringThe content disposition recorded for this email's body.
edmConvertedBooleanWhether the recipient clicked a tracked link in this email, indicating engagement.
emailReferencesStringThe chain of Message-IDs this email references, used to thread email conversations.
emailSendAttemptsList<EmailSendAttempt>The history of SMTP delivery attempts made for this email item.
emailTriggerEmailTriggerThe trigger configuration that caused this email to be generated, when it was sent automatically rather than by a job or a direct send.
encodingStringThe character encoding used for the email body.
forceSendBooleanWhether this email should be sent even when its job is not active. Has no effect when there is no job.
fromAddressStringThe from address this email was sent as.
hiddenBooleanWhether this email should be hidden from the recipient's inbox page.
htmlStringThe fully rendered HTML body of the email, after any template has been applied.
idlongThe database identity of this email item.
ignoredBooleanWhether this email item should be excluded from statistics and reporting counts.
inReplyToStringThe Message-ID this email is a reply to, used to thread email conversations.
jobBaseEmailJobThe job which caused this email to be sent, when it was generated as part of a bulk send.
lastAttemptEmailSendAttemptThe most recent SMTP delivery attempt recorded for this email item.
messageIdStringThe unique message identifier assigned by the sending mail system, such as Amazon SES.
messageSizeintThe size in bytes of the rendered email message.
nextAttemptDateThe date and time the next delivery retry is scheduled for.
numAttemptsIntegerThe number of attempts made at SMTP delivery so far.
originatingOrgOrganisationThe organisation responsible for creating this email, whether via an email job, a trigger, or a direct send.
pendingbooleanWhether the send status has been set to any non-null value. Despite the name this is true whenever a status has been recorded at all, not only when the status is specifically pending.
readStatusbooleanWhether this email has been read. Set to true either because it was read on the website, or because the email was determined to have been opened in an external email reader via a tracking image callback.
readyToSendbooleanWhether this email item is eligible to be (re)sent: the send status is either null, meaning it has never been attempted, or set to retry.
recipientBaseEntityThe account this email is addressed to.
recipientAddressStringThe email address this message was actually sent to.
replyToAddressStringThe reply-to address recipients should use when replying to this email.
reqFromStringThe source address of the read-tracking pixel request that marked this email as opened, as captured from the request.
senderProfileThe profile who sent this email, when it was sent by an internal user action.
sendStatusStringThe send status code for this email item: null when queued and not yet attempted, f for failed, c for completed, p for pending or in progress, or r for retry.
sendStatusDateDateThe timestamp of the current send status, updated whenever the status changes, for example when the item is queued, sent, retried or fails.
statusTextStringA short human-readable label describing the current status of this email item: converted, opened, queued, complete, failed, pending or retrying.
subjectStringThe email's subject line.
textStringThe plain text body of the email.
toListStringThe primary recipient addresses for this email, as a single delimited string.
userAgentStringThe user agent string captured from the read-tracking pixel request, identifying the client used to open the email.
visitedUrlStringThe first URL the recipient visited after clicking a link in this email, captured for conversion tracking.

Methods

isPending() · getId() · getAttachments() · getJob() · getSender() · getRecipient() · getRecipientAddress() · getFromAddress() · getReplyToAddress() · getSubject() · getHtml() · getText() · getCreatedDate() · getSendStatus() · getSendStatusDate() · isReadStatus() · getEmailSendAttempts() · getMessageSize() · getDisposition() · getBccList() · getCcList() · getContentLanguage() · getEncoding() · getToList() · getOriginatingOrg() · getContentStorageType() · getInReplyTo() · getEmailReferences() · getClusterVersion() · complete() · failed() · getNextAttempt() · getNumAttempts() · getEmailTrigger() · getHidden() · getForceSend() · forceSend() · getEdmConverted() · isIgnored() · getMessageId() · getReqFrom() · getVisitedUrl() · getUserAgent() · isReadyToSend() · getStatusText() · getLastAttempt()

isPending()

Returns: boolean

Whether the send status has been set to any non-null value. Despite the name this is true whenever a status has been recorded at all, not only when the status is specifically pending.

getId()

Returns: long

The database identity of this email item.

getAttachments()

Returns: List<EmailAttachment>

The files attached to this email.

getJob()

Returns: BaseEmailJob

The job which caused this email to be sent, when it was generated as part of a bulk send.

getSender()

Returns: Profile

The profile who sent this email, when it was sent by an internal user action.

getRecipient()

Returns: BaseEntity

The account this email is addressed to.

getRecipientAddress()

Returns: String

The email address this message was actually sent to.

getFromAddress()

Returns: String

The from address this email was sent as.

getReplyToAddress()

Returns: String

The reply-to address recipients should use when replying to this email.

getSubject()

Returns: String

The email's subject line.

getHtml()

Returns: String

The fully rendered HTML body of the email, after any template has been applied.

getText()

Returns: String

The plain text body of the email.

getCreatedDate()

Returns: Date

The date and time this email item was created.

getSendStatus()

Returns: String

The send status code for this email item: null when queued and not yet attempted, f for failed, c for completed, p for pending or in progress, or r for retry.

getSendStatusDate()

Returns: Date

The timestamp of the current send status, updated whenever the status changes, for example when the item is queued, sent, retried or fails.

isReadStatus()

Returns: boolean

Whether this email has been read. Set to true either because it was read on the website, or because the email was determined to have been opened in an external email reader via a tracking image callback.

getEmailSendAttempts()

Returns: List<EmailSendAttempt>

The history of SMTP delivery attempts made for this email item.

getMessageSize()

Returns: int

The size in bytes of the rendered email message.

getDisposition()

Returns: String

The content disposition recorded for this email's body.

getBccList()

Returns: String

The bcc recipient addresses for this email, as a single delimited string.

getCcList()

Returns: String

The cc recipient addresses for this email, as a single delimited string.

getContentLanguage()

Returns: String

The content language of the email body.

getEncoding()

Returns: String

The character encoding used for the email body.

getToList()

Returns: String

The primary recipient addresses for this email, as a single delimited string.

getOriginatingOrg()

Returns: Organisation

The organisation responsible for creating this email, whether via an email job, a trigger, or a direct send.

getContentStorageType()

Returns: String

Identifies where this email's body content is stored. Null means the html and text fields hold the content directly, otherwise this is an identifier telling EmailContentService which external store to use.

getInReplyTo()

Returns: String

The Message-ID this email is a reply to, used to thread email conversations.

getEmailReferences()

Returns: String

The chain of Message-IDs this email references, used to thread email conversations.

getClusterVersion()

Returns: String

Identifies which server cluster is responsible for sending this email item.

complete()

Returns: boolean

Whether this email item completed sending successfully. See getSendStatus for the other possible states.

failed()

Returns: boolean

Whether this email item failed to send. See getSendStatus for the other possible states.

getNextAttempt()

Returns: Date

The date and time the next delivery retry is scheduled for.

getNumAttempts()

Returns: Integer

The number of attempts made at SMTP delivery so far.

getEmailTrigger()

Returns: EmailTrigger

The trigger configuration that caused this email to be generated, when it was sent automatically rather than by a job or a direct send.

getHidden()

Returns: Boolean

Whether this email should be hidden from the recipient's inbox page.

getForceSend()

Returns: Boolean

Whether this email should be sent even when its job is not active. Has no effect when there is no job.

forceSend()

Returns: boolean

Null-safe primitive accessor for getForceSend.

getEdmConverted()

Returns: Boolean

Whether the recipient clicked a tracked link in this email, indicating engagement.

isIgnored()

Returns: Boolean

Whether this email item should be excluded from statistics and reporting counts.

getMessageId()

Returns: String

The unique message identifier assigned by the sending mail system, such as Amazon SES.

getReqFrom()

Returns: String

The source address of the read-tracking pixel request that marked this email as opened, as captured from the request.

getVisitedUrl()

Returns: String

The first URL the recipient visited after clicking a link in this email, captured for conversion tracking.

getUserAgent()

Returns: String

The user agent string captured from the read-tracking pixel request, identifying the client used to open the email.

isReadyToSend()

Returns: boolean

Whether this email item is eligible to be (re)sent: the send status is either null, meaning it has never been attempted, or set to retry.

getStatusText()

Returns: String

A short human-readable label describing the current status of this email item: converted, opened, queued, complete, failed, pending or retrying.

getLastAttempt()

Returns: EmailSendAttempt

The most recent SMTP delivery attempt recorded for this email item.

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