以下是win版本打印输出,rememberPassword函数走了两次,一次是imap和smtp两个密码

对比。mac只建立了一个imap密码
原因:Mac版本outserver不为空,没有进入条件判断:
- createInBackend.js:
- let outServer = MailServices.smtp.findServer(username, config.outgoing.hostname);
-
- if (config.outgoing.addThisServer && !outServer) //Mac版本 outServer不为null
- {
- outServer = MailServices.smtp.createServer();
- outServer.hostname = config.outgoing.hostname;
- outServer.port = config.outgoing.port;
- outServer.authMethod = config.outgoing.auth;
- if (config.outgoing.auth > 1)
- {
- outServer.username = username;
- if (config.rememberPassword && config.incoming.password.length)
- rememberPassword(outServer, config.incoming.password);
- }
在-p重新创建配置文件时,outServer为null,可以正常记住密码。
所以下一步从删除账户时是否没有删除smtpserver信息入手排查问题。
在win下抓到的删除账户信息:

和Mac下是一样的,暂时排查到这里。
刪除账户时,账户列表焦点不能自动选中其他列表:
选中列表的函数是:
- // Called when someone clicks on an account. Figure out context by what they
- // clicked on. This is also called when an account is removed. In this case,
- // nothing is selected.
- function onAccountTreeSelect(pageId, account)
注释明确说明在删除账户时会调用该函数。
下图是win下该函数的调用情况:
