Hello,
I need to create a mail account programatically (in js)
To to so, I need to play with at least the AccountManager.
To get a reference to this account manager, I use the following code:
const nsIMsgAccountManager =
Components.interfaces.nsIMsgAccountManager;
const MsgAccountManagerContractID =
"@mozilla.org/messenger/account-manager;1";
var LcMsgAccountManager =
Components.classes[MsgAccountManagerContractID].getService(nsIMsgAccountManager);
However, this seems to works only if I add the following line before:
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
The problem is that mozilla brings a dialog (that ask if I really want
to grant access ...). So, I cannot
create the account in the background.
Is there a way to prevent this dialog from appearing?
Thanks in advance for any answer.
PS: My javascript code is only used locally (i.e. I launch mozilla with
a file:// url), so perhaps the security
problem could be somehow overcomed .
--
---------------------------------------------------------------------
Francois Menneteau - Software Engineer, MIPSYS
Technoparc du Griffon - Bat 10
511, route de la Seds
13127 Vitrolles
Tel: +33 04 42 46 77 50 - Fax: +33 04 42 46 77 59
Email: [EMAIL PROTECTED]