Trait vsmtp_server::OnMail

pub trait OnMail {
    fn on_mail<'life0, 'async_trait>(
        &'life0 mut self,
        mail: Box<ContextFinished>,
        message: MessageBody,
        queue_manager: Arc<dyn GenericQueueManager>
    ) -> Pin<Box<dyn Future<Output = CodeID> + Send + 'async_trait>>
    where
        Self: Sized + 'async_trait,
        'life0: 'async_trait
; }
Expand description

will be executed once the email is received.

Required Methods§

fn on_mail<'life0, 'async_trait>(
    &'life0 mut self,
    mail: Box<ContextFinished>,
    message: MessageBody,
    queue_manager: Arc<dyn GenericQueueManager>
) -> Pin<Box<dyn Future<Output = CodeID> + Send + 'async_trait>>where
    Self: Sized + 'async_trait,
    'life0: 'async_trait,

the server executes this function once the email as been received.

Implementors§