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: passwordless.rs
    path of file: ./repos/TheReader/crates/backend/src/http/auth
    
    the code of the file until where you have to start completion: // You supply an email. We email the link to authenticate with.

// TODO: Better security. Simple Proof of Concept.

use actix_web::{http::header, HttpResponse};
use actix_web::{web, HttpMess
    
pub fn test_connection(email_config: &ConfigEmail) -> Result<bool> {
    let creds = Credentials::new(
        email_config.smtp_username.clone(),
        email_config.smtp_password.clone(),
    );

    // Open a remote connection to gmail
    let mailer = SmtpTransport::relay(&email_config.smtp_relay)?
        .credentials(creds)
        .build();

    Ok(mailer.test_connection()?)
}