Use account ID instead of name in passwordstorerc.
[claws.git] / src / imap.c
index 4307d050d5f9721edade031694f00b4c8615e9db..57bff7926cb40ae47aadd1d67728da8184494f61 100644 (file)
@@ -71,7 +71,7 @@
 #include "account.h"
 #include "tags.h"
 #include "main.h"
-#include "password.h"
+#include "passwordstore.h"
 
 typedef struct _IMAPFolder     IMAPFolder;
 typedef struct _IMAPSession    IMAPSession;
@@ -1288,7 +1288,8 @@ static gint imap_session_authenticate(IMAPSession *session,
                Xstrdup_a(acc_pass, pass, {g_free(pass); return MAILIMAP_NO_ERROR;});
                g_free(pass);
        } else {
-               acc_pass = password_decrypt(account->passwd, NULL);
+               acc_pass = passwd_store_get_account(account->account_id,
+                               PWS_ACCOUNT_RECV);
        }
 try_again:
        pass = acc_pass;