Name Description Size
AccountConfig.sys.mjs This file creates the class AccountConfig, which is a JS object that holds a configuration for a certain account. It is *not* created in the backend yet (use aw-createAccount.js for that), and it may be incomplete. Several AccountConfig objects may co-exist, e.g. for autoconfig. One AccountConfig object is used to prefill and read the widgets in the Wizard UI. When we autoconfigure, we autoconfig writes the values into a new object and returns that, and the caller can copy these values into the object used by the UI. See also <https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat> for values stored. 14681
AccountCreationUtils.sys.mjs Some common, generic functions 19791
ConfigVerifier.sys.mjs @implements {nsIUrlListener} @implements {nsIInterfaceRequestor} 12611
CreateInBackend.sys.mjs eslint-disable complexity 14361
ExchangeAutoDiscover.sys.mjs Initiates a fetch of the given URL, using either OAuth2 or Basic authentication. OAuth2 will be tried first, before falling back onto Basic auth if either: - we do not have an OAuth2 configuration for this provider, or - we failed to get an OAuth2 access token to use in the fetch (e.g., because the user cancelled the interactive login process). A deep copy of `callArgs` is always done before modifying it, so it can be reused between calls. @param {ParallelCall} call - The abortable call to register the FetchHTTP object with. @param {string} url - The URL to fetch. @param {string} username - The username to use for Basic auth and OAuth2. @param {string} password - The password to use for Basic auth. @param {object} callArgs - The arguments to use when creating the new FetchHTTP object. This object is not expected to include any authentication parameters or headers. 26388
FetchConfig.sys.mjs A callback that will be called when a configuration was retrieved and parsed successfully. @callback SuccessCallback @param {AccountConfig} config - The AccountConfig object. 11480
FetchHTTP.sys.mjs This is a small wrapper around XMLHttpRequest, which solves various inadequacies of the API, e.g. error handling. It is entirely generic and can be used for purposes outside of even mail. It does not provide download progress, but assumes that the fetched resource is so small (<1 10 KB) that the roundtrip and response generation is far more significant than the download time of the response. In other words, it's fine for RPC, but not for bigger file downloads. 13922
GuessConfig.sys.mjs Try to guess the config, by: - guessing hostnames (pop3.<domain>, pop.<domain>, imap.<domain>, mail.<domain> etc.) - probing known ports (for IMAP, POP3 etc., with SSL, STARTTLS etc.) - opening a connection via the right protocol and checking the protocol-specific CAPABILITIES like that the server returns. Final verification is not done here, but in verifyConfig(). This function is async. @param domain {String} the domain part of the email address @param progressCallback {function(type, hostname, port, socketType, done)} Called when we try a new hostname/port. type {String-enum} @see AccountConfig type - "imap", "pop3", "smtp" hostname {String} port {Integer} socketType {nsMsgSocketType} @see MailNewsTypes2.idl 0 = plain, 2 = STARTTLS, 3 = SSL done {Boolean} false, if we start probing this host/port, true if we're done and the host is good. (there is no notification when a host is bad, we'll just tell about the next host tried) @param successCallback {function(config {AccountConfig})} Called when we could guess the config. param accountConfig {AccountConfig} The guessed account config. username, password, realname, emailaddress etc. are not filled out, but placeholders to be filled out via replaceVariables(). @param errorCallback function(ex) Called when we could guess not the config, either because we have not found anything or because there was an error (e.g. no network connection). The ex.message will contain a user-presentable message. @param resultConfig {AccountConfig} (optional) A config which may be partially filled in. If so, it will be used as base for the guess. @param which {String-enum} (optional) "incoming", "outgoing", or "both". Default "both". Whether to guess only the incoming or outgoing server. @result {Abortable} Allows you to cancel the guess 43056
readFromXML.sys.mjs eslint-disable complexity 10878
Sanitizer.sys.mjs This is a generic input validation lib. Use it when you process data from the network. Just a few functions which verify, for security purposes, that the input variables (strings, if nothing else is noted) are of the expected type and syntax. The functions take a string (unless noted otherwise) and return the expected datatype in JS types. If the value is not as expected, they throw exceptions. 7483