I already hide accounts using this code:
Code: Select all
var acctMgr = Cc["@mozilla.org/messenger/account-manager;1"].getService(Ci.nsIMsgAccountManager);
var accounts = acctMgr.accounts;
for (var i = 0; i < accounts.length; i++) {
var account = accounts.queryElementAt(i, Ci.nsIMsgAccount);
account.incomingServer.hidden = true;
}
And that work perfectly.
But..
I thought if i do:
Code: Select all
account.incomingServer.hidden = false;
Question: How to retreive those accounts?
Here is some answer but i dont know how use that:
https://dxr.mozilla.org/comm-central/so ... Server.idl
Code: Select all
/**
* Hide this server/account from the UI - used for smart mailboxes.
* The server can be retrieved from the account manager by name using the
* various Find methods, but nsIMsgAccountManager's GetAccounts and
* GetAllServers methods won't return the server/account.
*/
attribute boolean hidden;