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: email_setting.rs
    path of file: ./repos/tabby/ee/tabby-db/src
    
    the code of the file until where you have to start completion: use anyhow::{anyhow, Result};
use sqlx::{query, query_as, query_scalar};

use crate::DbConn;

const EMAIL_CREDENTIAL_ROW_ID: i32 = 1;

#[derive(Debug, PartialEq)]
pub struct EmailSettingDAO {
    pub smtp_username: String,
    pub smtp_password: String,
    pub smtp_server: String,
   
    
    pub async fn read_email_setting(&self) -> Result<Option<EmailSettingDAO>> {
        let setting = query_as!(
            EmailSettingDAO,
            "SELECT smtp_username, smtp_password, smtp_server, smtp_port, from_address, encryption, auth_method FROM email_setting WHERE id=?",
            EMAIL_CREDENTIAL_ROW_ID
        )
        .fetch_optional(&self.pool)
        .await?;
        Ok(setting)
    }