pub mod config;
use async_trait::async_trait;
use log::info;
use crate::{account::config::AccountConfig, backend::BackendContextBuilder, Result};
use self::config::SendmailConfig;
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct SendmailContext {
pub account_config: AccountConfig,
pub sendmail_config: SendmailConfig,
}
impl SendmailContext {
pub fn new(account_config: AccountConfig, sendmail_config: SendmailConfig) -> Self {
Self {
account_config,
sendmail_config,
}
}
}
#[async_trait]
impl BackendContextBuilder for SendmailContext {
type Context = Self;
async fn build(self) -> Result<Self::Context> {
info!("building new sendmail context");
Ok(self)
}
}