From 4e4ade87194ea2ff1bef6ded5b79a9e0d22dc368 Mon Sep 17 00:00:00 2001 From: Robert Virkus Date: Sun, 2 Aug 2020 08:47:18 +0200 Subject: [PATCH] use email address as fallback --- lib/mail/mail_account.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mail/mail_account.dart b/lib/mail/mail_account.dart index bef49666..4c6b7df9 100644 --- a/lib/mail/mail_account.dart +++ b/lib/mail/mail_account.dart @@ -75,7 +75,8 @@ class MailAccount extends JsonSerializable { static MailAccount fromDiscoveredSetings( String name, String email, String password, ClientConfig config, {String userName, String outgoingClientDomain}) { - userName ??= config.preferredIncomingImapServer.getUserName(email); + userName ??= config.preferredIncomingServer.getUserName(email); + userName ??= email; var auth = PlainAuthentication(userName, password); var incoming = MailServerConfig() ..authentication = auth