Email

Struct Email 

Source
pub struct Email { /* private fields */ }
Expand description

Event details relating to an email transaction.

This field set focuses on the email message header, body, and attachments. Network protocols that send and receive email messages such as SMTP are outside the scope of the email.* fields.

Implementations§

Source§

impl Email

Source

pub fn get_attachments(&self) -> &Vec<String>

A list of objects describing the attachment files sent along with an email message.

Source

pub fn add_attachment(&mut self, attachment_arg: String)

A list of objects describing the attachment files sent along with an email message.

Source

pub fn get_attachments_file_extension(&self) -> Option<&String>

Attachment file extension, excluding the leading dot.

Source

pub fn set_attachments_file_extension( &mut self, attachments_file_extension_arg: String, )

Attachment file extension, excluding the leading dot.

§Example

txt

Source

pub fn get_attachments_file_mime_type(&self) -> Option<&String>

The MIME media type of the attachment.

This value will typically be extracted from the Content-Type MIME header field.

Source

pub fn set_attachments_file_mime_type( &mut self, attachments_file_mime_type_arg: String, )

The MIME media type of the attachment.

This value will typically be extracted from the Content-Type MIME header field.

§Example

text/plain

Source

pub fn get_attachments_file_name(&self) -> Option<&String>

Name of the attachment file including the file extension.

Source

pub fn set_attachments_file_name(&mut self, attachments_file_name_arg: String)

Name of the attachment file including the file extension.

§Example

attachment.txt

Source

pub fn get_attachments_file_size(&self) -> Option<&u64>

Attachment file size in bytes.

Source

pub fn set_attachments_file_size(&mut self, attachments_file_size_arg: u64)

Attachment file size in bytes.

§Example

64329

Source

pub fn get_bcc_address(&self) -> &Vec<String>

The email address of BCC recipient

Source

pub fn add_bcc_addres(&mut self, bcc_addres_arg: String)

The email address of BCC recipient

§Example

bcc.user1@example.com

Source

pub fn get_cc_address(&self) -> &Vec<String>

The email address of CC recipient

Source

pub fn add_cc_addres(&mut self, cc_addres_arg: String)

The email address of CC recipient

§Example

cc.user1@example.com

Source

pub fn get_content_type(&self) -> Option<&String>

Information about how the message is to be displayed.

Typically a MIME type.

Source

pub fn set_content_type(&mut self, content_type_arg: String)

Information about how the message is to be displayed.

Typically a MIME type.

§Example

text/plain

Source

pub fn get_delivery_timestamp(&self) -> Option<&Timestamp>

The date and time when the email message was received by the service or client.

Source

pub fn set_delivery_timestamp(&mut self, delivery_timestamp_arg: Timestamp)

The date and time when the email message was received by the service or client.

§Example

2020-11-10T22:12:34.8196921Z

Source

pub fn get_direction(&self) -> Option<&String>

The direction of the message based on the sending and receiving domains.

Source

pub fn set_direction(&mut self, direction_arg: String)

The direction of the message based on the sending and receiving domains.

§Example

inbound

Source

pub fn get_from_address(&self) -> &Vec<String>

The email address of the sender, typically from the RFC 5322 From: header field.

Source

pub fn add_from_addres(&mut self, from_addres_arg: String)

The email address of the sender, typically from the RFC 5322 From: header field.

§Example

sender@example.com

Source

pub fn get_local_id(&self) -> Option<&String>

Unique identifier given to the email by the source that created the event.

Identifier is not persistent across hops.

Source

pub fn set_local_id(&mut self, local_id_arg: String)

Unique identifier given to the email by the source that created the event.

Identifier is not persistent across hops.

§Example

c26dbea0-80d5-463b-b93c-4e8b708219ce

Source

pub fn get_message_id(&self) -> Option<&String>

Identifier from the RFC 5322 Message-ID: email header that refers to a particular email message.

Source

pub fn set_message_id(&mut self, message_id_arg: String)

Identifier from the RFC 5322 Message-ID: email header that refers to a particular email message.

§Example

81ce15$8r2j59@mail01.example.com

Source

pub fn get_origination_timestamp(&self) -> Option<&Timestamp>

The date and time the email message was composed. Many email clients will fill in this value automatically when the message is sent by a user.

Source

pub fn set_origination_timestamp( &mut self, origination_timestamp_arg: Timestamp, )

The date and time the email message was composed. Many email clients will fill in this value automatically when the message is sent by a user.

§Example

2020-11-10T22:12:34.8196921Z

Source

pub fn get_reply_to_address(&self) -> &Vec<String>

The address that replies should be delivered to based on the value in the RFC 5322 Reply-To: header.

Source

pub fn add_reply_to_addres(&mut self, reply_to_addres_arg: String)

The address that replies should be delivered to based on the value in the RFC 5322 Reply-To: header.

§Example

reply.here@example.com

Source

pub fn get_sender_address(&self) -> Option<&String>

Per RFC 5322, specifies the address responsible for the actual transmission of the message.

Source

pub fn set_sender_address(&mut self, sender_address_arg: String)

Per RFC 5322, specifies the address responsible for the actual transmission of the message.

Source

pub fn get_subject(&self) -> Option<&String>

A brief summary of the topic of the message.

Source

pub fn set_subject(&mut self, subject_arg: String)

A brief summary of the topic of the message.

§Example

Please see this important message.

Source

pub fn get_to_address(&self) -> &Vec<String>

The email address of recipient

Source

pub fn add_to_addres(&mut self, to_addres_arg: String)

The email address of recipient

§Example

user1@example.com

Source

pub fn get_x_mailer(&self) -> Option<&String>

The name of the application that was used to draft and send the original email message.

Source

pub fn set_x_mailer(&mut self, x_mailer_arg: String)

The name of the application that was used to draft and send the original email message.

§Example

Spambot v2.5

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

Source§

fn default() -> Email

Returns the “default value” for a type. 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 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.