pub struct FileMailer { /* private fields */ }Expand description
Development / debug mailer — writes each outgoing email to a
timestamped .eml file in a configured directory instead of
sending it.
Mirrors Django’s django.core.mail.backends.filebased.EmailBackend
(issue #417). Useful when you want to inspect rendered email
content (password-reset links, signup confirmations) during
development without wiring an SMTP relay or piping stdout into a
log file.
File names are YYYYMMDDHHMMSS-<seq>.eml so a burst of emails
inside the same second still get unique paths. The directory is
created on send if it doesn’t yet exist.
Implementations§
Trait Implementations§
Source§impl Mailer for FileMailer
impl Mailer for FileMailer
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 Email,
) -> Pin<Box<dyn Future<Output = Result<(), MailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
email: &'life1 Email,
) -> Pin<Box<dyn Future<Output = Result<(), MailError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send
email. Implementations should validate before transmitting
(the helper Email::validate is the canonical check).Auto Trait Implementations§
impl !Freeze for FileMailer
impl RefUnwindSafe for FileMailer
impl Send for FileMailer
impl Sync for FileMailer
impl Unpin for FileMailer
impl UnsafeUnpin for FileMailer
impl UnwindSafe for FileMailer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more