pub struct Mailer { /* private fields */ }Expand description
High-level email service that ties together template loading, variable substitution, Markdown rendering, layout wrapping, and transport delivery.
Mailer is cheaply cloneable via internal Arcs, making it safe to share
across async tasks and register as a modo service.
Implementations§
Source§impl Mailer
impl Mailer
Sourcepub fn new(
transport: Arc<dyn MailTransportDyn>,
templates: Arc<dyn TemplateProvider>,
default_sender: SenderProfile,
layout_engine: Arc<LayoutEngine>,
) -> Self
pub fn new( transport: Arc<dyn MailTransportDyn>, templates: Arc<dyn TemplateProvider>, default_sender: SenderProfile, layout_engine: Arc<LayoutEngine>, ) -> Self
Construct a Mailer from its constituent parts.
Prefer the mailer or mailer_with
factory functions for typical usage.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mailer
impl !RefUnwindSafe for Mailer
impl Send for Mailer
impl Sync for Mailer
impl Unpin for Mailer
impl UnsafeUnpin for Mailer
impl !UnwindSafe for Mailer
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