aboutsummaryrefslogtreecommitdiff
path: root/src/server.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 14:11:00 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 14:11:00 +0200
commit5b3b2955fc9925b535b2b9049027d947f6bcd47e (patch)
treea124dd7129f8d7031ee84a5edcc3dfd4f19c2b6d /src/server.rs
parent43f443c7a85e5172b5c1a6a69db775659214196d (diff)
downloadaerogramme-5b3b2955fc9925b535b2b9049027d947f6bcd47e.tar.gz
aerogramme-5b3b2955fc9925b535b2b9049027d947f6bcd47e.zip
Add test code
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server.rs b/src/server.rs
index 432f597..6080fa2 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -145,12 +145,15 @@ impl Server {
pub async fn run(self: Self) -> Result<()> {
tracing::info!("Starting server on {:#}", self.incoming.local_addr);
+
+
+ let creds = self.mailstore.login_provider.login("quentin", "poupou").await?;
+ let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
+ mailbox.test().await?;
+
let server = ImapServer::new(self.incoming).serve(Instance::new(self.mailstore.clone()));
let _ = server.await?;
- /*let creds = self.login_provider.login("quentin", "poupou").await?;
- let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
- mailbox.test().await?;*/
Ok(())
}