pub struct MailEnvelope {
pub from: String,
pub to: String,
pub cc: String,
pub subject: String,
pub body: String,
pub has_attachment: bool,
pub headers: Vec<(String, String)>,
pub envelope_from: Option<String>,
pub envelope_to: Option<String>,
}Expand description
A simple envelope of the fields a filter engine needs.
A ready-made Filterable implementation for callers that do not want to
implement the trait for their own message type.
Fields§
§from: StringFirst From address email.
to: StringFirst To address email.
cc: StringFirst Cc address email.
subject: StringSubject header.
body: StringBody text.
has_attachment: boolWhether the message has attachments.
headers: Vec<(String, String)>Raw headers (name -> value) for Header conditions.
envelope_from: Option<String>Envelope sender (SMTP MAIL FROM) for Envelope conditions and
vacation reply routing; None when not supplied.
envelope_to: Option<String>Envelope recipient (SMTP RCPT TO); None when not supplied.
Trait Implementations§
Source§impl Clone for MailEnvelope
impl Clone for MailEnvelope
Source§fn clone(&self) -> MailEnvelope
fn clone(&self) -> MailEnvelope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MailEnvelope
impl Debug for MailEnvelope
Source§impl Default for MailEnvelope
impl Default for MailEnvelope
Source§fn default() -> MailEnvelope
fn default() -> MailEnvelope
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MailEnvelope
impl<'de> Deserialize<'de> for MailEnvelope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Filterable for MailEnvelope
impl Filterable for MailEnvelope
Source§fn has_attachment(&self) -> bool
fn has_attachment(&self) -> bool
Whether the message has attachments.
Source§fn header(&self, name: &str) -> Option<&str>
fn header(&self, name: &str) -> Option<&str>
Value of a raw header by name (case-insensitive lookup), if present.
Source§fn envelope_from(&self) -> Option<&str>
fn envelope_from(&self) -> Option<&str>
Source§fn envelope_to(&self) -> Option<&str>
fn envelope_to(&self) -> Option<&str>
Envelope recipient (SMTP
RCPT TO), when the caller supplies envelope
data. See envelope_from.Auto Trait Implementations§
impl Freeze for MailEnvelope
impl RefUnwindSafe for MailEnvelope
impl Send for MailEnvelope
impl Sync for MailEnvelope
impl Unpin for MailEnvelope
impl UnsafeUnpin for MailEnvelope
impl UnwindSafe for MailEnvelope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more