pub struct SendEmail { /* private fields */ }Expand description
Builder for requesting a templated email send.
Create with SendEmail::new, then chain builder methods to set
recipients, locale, sender override, and template variables before
passing to Mailer::send or Mailer::render.
Implementations§
Source§impl SendEmail
impl SendEmail
Sourcepub fn new(template: &str, to: &str) -> Self
pub fn new(template: &str, to: &str) -> Self
Create a new send request for the named template addressed to to.
Sourcepub fn locale(self, locale: &str) -> Self
pub fn locale(self, locale: &str) -> Self
Set the locale used for template resolution. Falls back to the root template when no localized variant is found.
Sourcepub fn sender(self, sender: &SenderProfile) -> Self
pub fn sender(self, sender: &SenderProfile) -> Self
Override the default sender with a per-email SenderProfile.
Trait Implementations§
Source§impl From<SendEmail> for SendEmailPayload
impl From<SendEmail> for SendEmailPayload
Source§impl From<SendEmailPayload> for SendEmail
impl From<SendEmailPayload> for SendEmail
Source§fn from(p: SendEmailPayload) -> Self
fn from(p: SendEmailPayload) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SendEmail
impl RefUnwindSafe for SendEmail
impl Send for SendEmail
impl Sync for SendEmail
impl Unpin for SendEmail
impl UnsafeUnpin for SendEmail
impl UnwindSafe for SendEmail
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