pub struct EmailModule {
pub settings_service: Arc<SettingsService>,
pub template_engine: Arc<TemplateEngine>,
pub sender: Arc<EmailSender>,
}Expand description
Email module - main orchestrator for email operations
Fields§
§settings_service: Arc<SettingsService>§template_engine: Arc<TemplateEngine>§sender: Arc<EmailSender>Implementations§
Source§impl EmailModule
impl EmailModule
pub fn new(settings_service: Arc<SettingsService>) -> ClResult<Self>
Sourcepub async fn schedule_email_task(
scheduler: &Scheduler<App>,
settings_service: &SettingsService,
tn_id: TnId,
params: EmailTaskParams,
) -> ClResult<()>
pub async fn schedule_email_task( scheduler: &Scheduler<App>, settings_service: &SettingsService, tn_id: TnId, params: EmailTaskParams, ) -> ClResult<()>
Schedule email for async sending via task system with automatic retries
Uses the scheduler’s built-in RetryPolicy with exponential backoff. Retry configuration is loaded from settings (email.retry_attempts).
Template is rendered at execution time, not scheduling time.
Sourcepub async fn schedule_email_task_with_key(
scheduler: &Scheduler<App>,
settings_service: &SettingsService,
tn_id: TnId,
params: EmailTaskParams,
) -> ClResult<()>
pub async fn schedule_email_task_with_key( scheduler: &Scheduler<App>, settings_service: &SettingsService, tn_id: TnId, params: EmailTaskParams, ) -> ClResult<()>
Schedule email task with optional custom key for deduplication
Auto Trait Implementations§
impl Freeze for EmailModule
impl !RefUnwindSafe for EmailModule
impl Send for EmailModule
impl Sync for EmailModule
impl Unpin for EmailModule
impl UnsafeUnpin for EmailModule
impl !UnwindSafe for EmailModule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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