Skip to main content

Email

Struct Email 

Source
pub struct Email {
Show 24 fields pub id: String, pub blob_id: String, pub thread_id: Option<String>, pub mailbox_ids: HashMap<String, bool>, pub keywords: HashMap<String, bool>, pub size: u64, pub received_at: DateTime<Utc>, pub message_id: Option<Vec<String>>, pub in_reply_to: Option<Vec<String>>, pub references: Option<Vec<String>>, pub sender: Option<Vec<EmailAddress>>, pub from: Option<Vec<EmailAddress>>, pub to: Option<Vec<EmailAddress>>, pub cc: Option<Vec<EmailAddress>>, pub bcc: Option<Vec<EmailAddress>>, pub reply_to: Option<Vec<EmailAddress>>, pub subject: Option<String>, pub sent_at: Option<DateTime<Utc>>, pub has_attachment: bool, pub preview: Option<String>, pub body_values: Option<HashMap<String, EmailBodyValue>>, pub text_body: Option<Vec<EmailBodyPart>>, pub html_body: Option<Vec<EmailBodyPart>>, pub attachments: Option<Vec<EmailBodyPart>>,
}
Expand description

Email object as defined in RFC 8621

Fields§

§id: String

Unique identifier for the email

§blob_id: String

Blob ID for the raw RFC 5322 message

§thread_id: Option<String>

Thread ID

§mailbox_ids: HashMap<String, bool>

Mailbox IDs (map of mailbox ID to boolean)

§keywords: HashMap<String, bool>

Keywords/flags (e.g., $seen, $flagged, $draft)

§size: u64

Size in bytes

§received_at: DateTime<Utc>

Time email was received at the server

§message_id: Option<Vec<String>>

Message-ID header

§in_reply_to: Option<Vec<String>>

In-Reply-To header

§references: Option<Vec<String>>

References header

§sender: Option<Vec<EmailAddress>>

Sender header

§from: Option<Vec<EmailAddress>>

From header

§to: Option<Vec<EmailAddress>>

To header

§cc: Option<Vec<EmailAddress>>

Cc header

§bcc: Option<Vec<EmailAddress>>

Bcc header

§reply_to: Option<Vec<EmailAddress>>

Reply-To header

§subject: Option<String>

Subject header

§sent_at: Option<DateTime<Utc>>

Sent-At date from Date header

§has_attachment: bool

Has attachment

§preview: Option<String>

Preview text

§body_values: Option<HashMap<String, EmailBodyValue>>

Body values (for body parts)

§text_body: Option<Vec<EmailBodyPart>>

Text body parts

§html_body: Option<Vec<EmailBodyPart>>

HTML body parts

§attachments: Option<Vec<EmailBodyPart>>

Attachments

Trait Implementations§

Source§

impl Clone for Email

Source§

fn clone(&self) -> Email

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Email

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Email

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Email

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Email

§

impl RefUnwindSafe for Email

§

impl Send for Email

§

impl Sync for Email

§

impl Unpin for Email

§

impl UnsafeUnpin for Email

§

impl UnwindSafe for Email

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,