pub struct SenderProfile {
pub from_name: String,
pub from_email: String,
pub reply_to: Option<String>,
}Expand description
Sender identity for outgoing emails.
Fields§
§from_name: StringDisplay name shown in the From header.
from_email: StringEmail address used in the From header.
reply_to: Option<String>Optional Reply-To address.
Implementations§
Source§impl SenderProfile
impl SenderProfile
Sourcepub fn format_address(&self) -> String
pub fn format_address(&self) -> String
Format as "Name <email>" for the From header.
Strips control characters and angle brackets from the name, and control characters from the email, to prevent header injection.
Trait Implementations§
Source§impl Clone for SenderProfile
impl Clone for SenderProfile
Source§fn clone(&self) -> SenderProfile
fn clone(&self) -> SenderProfile
Returns a duplicate of the value. Read more
1.0.0 · 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 SenderProfile
impl Debug for SenderProfile
Source§impl<'de> Deserialize<'de> for SenderProfile
impl<'de> Deserialize<'de> for SenderProfile
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 SenderProfile
impl RefUnwindSafe for SenderProfile
impl Send for SenderProfile
impl Sync for SenderProfile
impl Unpin for SenderProfile
impl UnsafeUnpin for SenderProfile
impl UnwindSafe for SenderProfile
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