pub struct MailConfig {Show 13 fields
pub default_from: String,
pub default_from_name: Option<String>,
pub allowed_recipient_domains: Vec<String>,
pub max_subject_chars: usize,
pub max_body_bytes: usize,
pub max_recipients: usize,
pub max_attachments: usize,
pub max_attachment_bytes: usize,
pub max_bulk_messages: usize,
pub allow_html_body: bool,
pub allow_attachments: bool,
pub allow_bulk_send: bool,
pub max_total_attachment_bytes: Option<usize>,
}Fields§
§default_from: String§default_from_name: Option<String>§allowed_recipient_domains: Vec<String>Global recipient domain allowlist (empty = allow all domains).
max_subject_chars: usize§max_body_bytes: usize§max_recipients: usizeMaximum number of recipients per request. Default 10.
max_attachments: usizeMaximum number of attachments per request (RFC 502).
max_attachment_bytes: usizeMaximum decoded size per attachment in bytes (RFC 502). Default 10 MiB.
max_bulk_messages: usizeMaximum number of messages per POST /v1/send-bulk request (RFC 701).
allow_html_body: boolAllow HTML body in submissions (RFC 823 — default: false for attack surface reduction).
allow_attachments: boolAllow file attachments in submissions (RFC 823 — default: false).
allow_bulk_send: boolAllow bulk send via POST /v1/send-bulk (RFC 823 — default: false).
max_total_attachment_bytes: Option<usize>Aggregate maximum decoded bytes across all attachments in one request (RFC 826).
None = no aggregate limit (only per-attachment limit applies).
Trait Implementations§
Source§impl Clone for MailConfig
impl Clone for MailConfig
Source§fn clone(&self) -> MailConfig
fn clone(&self) -> MailConfig
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 MailConfig
impl Debug for MailConfig
Source§impl<'de> Deserialize<'de> for MailConfig
impl<'de> Deserialize<'de> for MailConfig
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
Auto Trait Implementations§
impl Freeze for MailConfig
impl RefUnwindSafe for MailConfig
impl Send for MailConfig
impl Sync for MailConfig
impl Unpin for MailConfig
impl UnsafeUnpin for MailConfig
impl UnwindSafe for MailConfig
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