#[non_exhaustive]pub struct EmailSubmission {
pub id: Id,
pub identity_id: Id,
pub email_id: Id,
pub thread_id: Id,
pub envelope: Option<Envelope>,
pub send_at: UTCDate,
pub undo_status: UndoStatus,
pub delivery_status: Option<BTreeMap<String, DeliveryStatus>>,
pub dsn_blob_ids: Vec<Id>,
pub mdn_blob_ids: Vec<Id>,
pub extra: Map<String, Value>,
}Expand description
Represents the submission of an Email for delivery (RFC 8621 §7).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: IdServer-assigned immutable identifier for this submission.
identity_id: IdId of the Identity used to send this submission.
email_id: IdId of the Email being submitted.
thread_id: IdThread id of the submitted Email (server-set).
envelope: Option<Envelope>SMTP envelope; server-derived from Email headers when absent on creation.
send_at: UTCDateUTC timestamp when the submission was / will be released for delivery.
undo_status: UndoStatusWhether the submission may still be canceled.
delivery_status: Option<BTreeMap<String, DeliveryStatus>>Per-recipient delivery status, keyed by recipient email address.
None when the server does not support delivery-status tracking.
dsn_blob_ids: Vec<Id>Blob ids of DSN messages (RFC 3464) received for this submission.
Always present in serialized output (empty array when no DSN has been received);
RFC 8621 §7 requires these fields in responses. Do not add skip_serializing_if.
mdn_blob_ids: Vec<Id>Blob ids of MDN messages (RFC 8098) received for this submission.
Always present in serialized output; same rationale as dsn_blob_ids.
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Implementations§
Source§impl EmailSubmission
impl EmailSubmission
Sourcepub fn new(
id: Id,
identity_id: Id,
email_id: Id,
thread_id: Id,
send_at: UTCDate,
undo_status: UndoStatus,
) -> Self
pub fn new( id: Id, identity_id: Id, email_id: Id, thread_id: Id, send_at: UTCDate, undo_status: UndoStatus, ) -> Self
Construct an EmailSubmission from its required fields.
envelope and delivery_status default to None.
dsn_blob_ids and mdn_blob_ids default to empty.
Trait Implementations§
Source§impl Clone for EmailSubmission
impl Clone for EmailSubmission
Source§impl Debug for EmailSubmission
impl Debug for EmailSubmission
Source§impl<'de> Deserialize<'de> for EmailSubmission
impl<'de> Deserialize<'de> for EmailSubmission
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EmailSubmission
impl GetObject for EmailSubmission
Source§impl JmapObject for EmailSubmission
impl JmapObject for EmailSubmission
Source§impl PartialEq for EmailSubmission
impl PartialEq for EmailSubmission
Source§impl QueryObject for EmailSubmission
impl QueryObject for EmailSubmission
Source§type Comparator = EmailSubmissionComparator
type Comparator = EmailSubmissionComparator
Source§impl Serialize for EmailSubmission
impl Serialize for EmailSubmission
Source§impl SetObject for EmailSubmission
RFC 8621 §7 (rfc8621.txt:4134-4417): id, threadId and sendAt are
“(immutable; server-set)”; deliveryStatus, dsnBlobIds and
mdnBlobIds are “(server-set)”; identityId, emailId and envelope
are “(immutable)”; undoStatus carries no attribute.
impl SetObject for EmailSubmission
RFC 8621 §7 (rfc8621.txt:4134-4417): id, threadId and sendAt are
“(immutable; server-set)”; deliveryStatus, dsnBlobIds and
mdnBlobIds are “(server-set)”; identityId, emailId and envelope
are “(immutable)”; undoStatus carries no attribute.
Source§const SERVER_SET: &'static [&'static str]
const SERVER_SET: &'static [&'static str]
/set method text never accepts from a
client, on create or update, is server-set too. Read moreSource§const CLIENT_SETTABLE: &'static [&'static str]
const CLIENT_SETTABLE: &'static [&'static str]
SERVER_SET: the ones a
client may set through /set. Read moreSource§const IMMUTABLE: &'static [&'static str]
const IMMUTABLE: &'static [&'static str]
CLIENT_SETTABLE properties the spec marks “immutable”: “The
value MUST NOT change after the object is created.” (RFC 8620 §1.1).
A property the /set method text accepts on create but not on update
is immutable too. Read more