Compare Revisions

Account examples

Change Revisions

Revision 130283:

Revision 130283 by Clarkbw on

Revision 130284:

Revision 130284 by jenzed on

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

Revision 130283
Revision 130284
n19    <pre>n19    <pre class="brush: js">
20<code>var acctMgr = Components.classes["@mozilla.org/messenger/ac20<code>var acctMgr = Components.classes["@mozilla.org/messenger/ac
>count-manager;1"]>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>  // Do something with account<br>}</code>
21                        .getService(Components.interfaces.nsIMsgA
>ccountManager); 
22var accounts = acctMgr.accounts;
23for (var i = 0; i &lt; accounts.Count(); i++) {
24  var account = accounts.QueryElementAt(i, Components.interfaces.
>nsIMsgAccount); 
25  // Do something with account
26}</code>
t28    <p>t
29      &nbsp;
30    </p>

Back to History