This allows to distinguish between two connection to the same host using
different usernames, when the username is not encoded in the URL.
Issue #1664
return NULL;
struct Url *url = url_parse(path);
+ if (!url->user && C_ImapUser)
+ url->user = C_ImapUser;
struct ImapAccountData *adata = a->adata;
struct ConnAccount *ac = &adata->conn_account;
if (url->scheme == U_IMAPS)
account->flags |= MUTT_ACCT_SSL;
+ if (C_ImapUser)
+ {
+ mutt_str_strfcpy(account->user, C_ImapUser, sizeof(account->user));
+ account->flags |= MUTT_ACCT_USER;
+ }
+
mutt_str_strfcpy(mailbox, url->path, mailboxlen);
url_free(&url);