Email

Struct Email 

Source
#[non_exhaustive]
pub struct Email {
Show 30 fields pub cc: Option<Vec<String>>, pub cc_mailboxes: Option<Vec<String>>, pub data_classification: Option<Box<DataClassification>>, pub data_classifications: Option<Vec<DataClassification>>, pub delivered_to: Option<String>, pub delivered_to_list: Option<Vec<String>>, pub files: Option<Vec<File>>, pub from: Option<String>, pub from_list: Option<Vec<String>>, pub from_mailbox: Option<String>, pub from_mailboxes: Option<Vec<String>>, pub http_headers: Option<Vec<HttpHeader>>, pub is_read: Option<bool>, pub message_uid: Option<String>, pub raw_header: Option<String>, pub reply_to: Option<String>, pub reply_to_list: Option<Vec<String>>, pub reply_to_mailboxes: Option<Vec<String>>, pub return_path: Option<String>, pub sender: Option<String>, pub sender_mailbox: Option<String>, pub size: Option<i64>, pub smtp_from: Option<String>, pub smtp_to: Option<Vec<String>>, pub subject: Option<String>, pub to: Option<Vec<String>>, pub to_mailboxes: Option<Vec<String>>, pub uid: Option<String>, pub urls: Option<Vec<Url>>, pub x_originating_ip: Option<Vec<String>>,
}
Expand description

Email

The Email object describes the email metadata such as sender, recipients, and direction, and can include embedded URLs and files.

[] Category: | Name: email

Constraints:

  • at_least_one: [from,to]

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§cc: Option<Vec<String>>

Cc

The machine-readable email header Cc values, as defined by RFC 5322. For example example.user@usersdomain.com.

optional

§cc_mailboxes: Option<Vec<String>>

Cc Mailboxes

The human-readable email header Cc Mailbox values. For example ‘Example User <example.user@usersdomain.com>’.

optional

§data_classification: Option<Box<DataClassification>>

Data Classification

The Data Classification object includes information about data classification levels and data category types.

recommended

§data_classifications: Option<Vec<DataClassification>>

Data Classification

A list of Data Classification objects, that include information about data classification levels and data category types, identified by a classifier.

recommended

§delivered_to: Option<String>

Delivered To

The machine-readable Delivered-To email header field. For example example.user@usersdomain.com

optional

§delivered_to_list: Option<Vec<String>>

Delivered To List

The machine-readable Delivered-To email header values. For example example.user@usersdomain.com

optional

§files: Option<Vec<File>>

Files

The files embedded or attached to the email.

optional

§from: Option<String>

From

The machine-readable email header From value, as defined by RFC 5322. For example example.user@usersdomain.com.

recommended

§from_list: Option<Vec<String>>

From List

The machine-readable email header From values. This array should contain the value in from. For example example.user@usersdomain.com.

optional

§from_mailbox: Option<String>

From Mailbox

The human-readable email header From Mailbox value. For example ‘Example User <example.user@usersdomain.com>’.

optional

§from_mailboxes: Option<Vec<String>>

From Mailboxes

The human-readable email header From Mailbox values. This array should contain the value in from_mailbox. For example ‘Example User <example.user@usersdomain.com>’.

optional

§http_headers: Option<Vec<HttpHeader>>

HTTP Headers

Additional HTTP headers of an HTTP request or response.

optional

§is_read: Option<bool>

Read

The indication of whether the email has been read.

optional

§message_uid: Option<String>

Message UID

The email header Message-ID value, as defined by RFC 5322.

recommended

§raw_header: Option<String>

Raw Header

The email authentication header.

optional

§reply_to: Option<String>

Reply To

The machine-readable email header Reply-To value, as defined by RFC 5322. For example example.user@usersdomain.com

recommended

§reply_to_list: Option<Vec<String>>

Reply To List

The machine-readable email header Reply-To values, as defined by RFC 5322. For example example.user@usersdomain.com

optional

§reply_to_mailboxes: Option<Vec<String>>

Reply To Mailboxes

The human-readable email header Reply To Mailbox values. For example ‘Example User <example.user@usersdomain.com>’.

optional

§return_path: Option<String>

Return Path

The address found in the ‘Return-Path’ header, which indicates where bounce messages (non-delivery reports) should be sent. This address is often set by the sending system and may differ from the ‘From’ or ‘Sender’ addresses. For example, mailer-daemon@senderserver.com.

optional

§sender: Option<String>

Sender

The machine readable email address of the system or server that actually transmitted the email message, extracted from the email headers per RFC 5322. This differs from the from field, which shows the message author. The sender field is most commonly used when multiple addresses appear in the from_list field, or when the transmitting system is different from the message author (such as when sending on behalf of someone else).

optional

§sender_mailbox: Option<String>

Sender Mailbox

The human readable email address of the system or server that actually transmitted the email message, extracted from the email headers per RFC 5322. This differs from the from_mailbox field, which shows the message author. The sender mailbox field is most commonly used when multiple addresses appear in the from_mailboxes field, or when the transmitting system is different from the message author (such as when sending on behalf of someone else).

optional

§size: Option<i64>

Size

The size in bytes of the email, including attachments.

recommended

§smtp_from: Option<String>

SMTP From

The value of the SMTP MAIL FROM command.

recommended

§smtp_to: Option<Vec<String>>

SMTP To

The value of the SMTP envelope RCPT TO command.

recommended

§subject: Option<String>

Subject

The email header Subject value, as defined by RFC 5322.

recommended

§to: Option<Vec<String>>

To

The machine-readable email header To values, as defined by RFC 5322. For example example.user@usersdomain.com

recommended

§to_mailboxes: Option<Vec<String>>

To Mailboxes

The human-readable email header To Mailbox values. For example ‘Example User <example.user@usersdomain.com>’.

optional

§uid: Option<String>

Email Thread UID

The unique identifier of the email thread.

recommended

§urls: Option<Vec<Url>>

URLs

The URLs embedded in the email.

optional

§x_originating_ip: Option<Vec<String>>

X-Originating-IP

The X-Originating-IP header identifying the emails originating IP address(es).

optional

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 Default for Email

Source§

fn default() -> Email

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Email
where Email: Default,

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 PartialEq for Email

Source§

fn eq(&self, other: &Email) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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
Source§

impl StructuralPartialEq for Email

Auto Trait Implementations§

§

impl Freeze for Email

§

impl RefUnwindSafe for Email

§

impl Send for Email

§

impl Sync for Email

§

impl Unpin 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, 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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,