mozilla

Compare Revisions

Account examples

Change Revisions

Revision 130281:

Revision 130281 by Jcranmer on

Revision 130282:

Revision 130282 by Clarkbw on

Title:
Account examples
Account examples
Slug:
Thunderbird/Account_examples
Thunderbird/Account_examples
Tags:
Extensions, thunderbird
Extensions, thunderbird
Content:

Revision 130281
Revision 130282
tt34    <pre>
35<code>var acctMgr = Components.classes["@mozilla.org/messenger/ac
 >count-manager;1"]<br>                        .getService(Componen
 >ts.interfaces.nsIMsgAccountManager);<br>var accounts = acctMgr.ac
 >counts;<br>for (var i = 0; i &lt; accounts.Count(); i++) {<br>  v
 >ar account = accounts.QueryElementAt(i, Components.interfaces.nsI
 >MsgAccount);<br>  Application.console.log(account.key);<br>  // a
 >ccount.incomingServer is an nsIMsgIncomingServer<br>  // account.
 >identities is an nsISupportsArray of nsIMsgIdentity objects<br>  
 >//                    you can loop through it just like acctMgr.a
 >ccounts above<br>  // account.defaultIdentity is an nsIMsgIdentit
 >y<br>}</code>
36</pre>

Back to History