nsIMsgAccountManager
and implemented by nsMsgAccountManager
.MailServices.accounts
. To get to it from C++, use mozilla::components::AccountManager::Service()
. (The rest of this page will describe things in JS terms only for ease of reading.)nsIMsgAccount
and implemented by nsMsgAccount
. If you're looking to use something in a mail account, you'll probably first get a reference to an nsIMsgAccount
.key
property, which is the word account
and then a number. Preferences for an account have the prefix mail.accounts.accountX
.MailServices.accounts.accounts
. To get a particular account, use MailServices.accounts.getAccount(accountKey)
.nsIMsgIncomingServer
and a sub-interface and implementation exists for each type of server Thunderbird can connect to.key
property, which is the word server
and then a number. Preferences for an account have the prefix mail.servers.serverX
.incomingServer
property. To get the account for a server, use MailServices.accounts.FindAccountForServer(server)
.MailServices.accounts.allServers
. To get a particular server, use MailServices.accounts.getIncomingServer(serverKey)
.nsIMsgIdentity
and implemented by nsMsgIdentity
.key
property, which is the word id
and then a number. Preferences for an account have the prefix mail.identity.idX
.identities
and defaultIdentity
properties to access them. MailServices.accounts.getServersForIdentity(identity)
to get the server(s) for an identity, and go from there to get the accounts. (Yes, this is weird.)MailServices.accounts.allIdentities
. To get a particular identity, use MailServices.accounts.getIdentity(identityKey)
.MailServices.smtp
or mozilla::Components::Smtp::Service()
, implements nsISmtpService
as SmtpService
.nsISmtpServer
as SmtpServer
. They also are identified by a key
property, which is the word smtp
and then a number. Preferences for an account have the prefix mail.smtpserver.smtpX
.smtpServerKey
attribute.MailServices.smtp.servers
. To get a particular server, use MailServices.smtp.getServerByKey(smtpKey)
.