You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mod.rs
    path of file: ./repos/tabby/ee/tabby-webserver/src/service/email
    
    the code of the file until where you have to start completion: use std::sync::Arc;

use anyhow::anyhow;
use async_trait::async_trait;
use lettre::{
    message::{header::ContentType, Mailbox, MessageBuilder},
    transport::smtp::{
        authentication::{Credentials, Mechanism},
        client::{Tls, TlsParameters},
        AsyncSmtpTransportBuilder,
    },
    Address, AsyncSmtpTransport, AsyncTransport, Tokio1Executor,
};
use tabby_db::DbConn;
use tokio::{sync::RwLock, task::JoinHandle};
use tracing::warn;
mod templates;
#[cfg(test)]
pub mod testutils;

use super::dao::DbEnum;
use crate::schema::{
    email::{AuthMethod, EmailService, EmailSetting, EmailSettingInput, Encryption},
    setting::SettingService,
    CoreError, Result,

    
    async fn test_update_email_with_service() {
        let db: DbConn = DbConn::new_in_memory().await.unwrap();
        let service = EmailServiceImpl::new(db);

        let update_input = EmailSettingInput {
            smtp_username: "test@example.com".into(),
            from_address: "test".into(),
            smtp_server: "smtp://example.com".into(),
            smtp_port: 578,
            encryption: Encryption::SslTls,
            auth_method: AuthMethod::None,
            smtp_password: Some("123456".to_owned()),
        };
        service.update_email_setting(update_input).await.unwrap();
        let setting = service.read_email_setting().await.unwrap().unwrap();
        assert_eq!(setting.smtp_username, "test@example.com");

        service.delete_email_setting().await.unwrap();
    }