introduce get_primary_addr() shortcutting access the configured address for an account.

This commit is contained in:
holger krekel
2022-04-13 20:38:00 +02:00
parent c0abcf3daa
commit 4661ffb762
15 changed files with 38 additions and 120 deletions

View File

@@ -1117,11 +1117,7 @@ impl Imap {
.session
.as_mut()
.context("IMAP No Connection established")?;
let self_addr = context
.get_config(Config::ConfiguredAddr)
.await?
.context("not configured")?;
let self_addr = context.get_primary_addr().await?;
let search_command = format!("FROM \"{}\"", self_addr);
let uids = session
.uid_search(search_command)