Skip to main content

🔑 extjs-app-localmailaccount

Application Package serving as Authentication Provider. Provides the client logic for sending IMAP configurations with request payload for dynamically connecting to them.

Use this package, if you...​

Requirements​

Works great with lumen-app-email!

This package was developed along with lumen-app-email and is ready to be used with it.

Mocking required Services

When using this package without a running backend, you should use the extjs-dev-webmailsim-package for providing fake endpoints. The ioc.bindings used with this package should contain an entry similar to the following:

extjs-app-localmailaccount.conf.json
"ioc": {
"bindings": {
"conjoon.dev.cn_mailsim": {
"conjoon.dev.cn_mailsim.data.SimletAdapter": "conjoon.localmailaccount.dev.BasicAuthSimletAdapter"
}
}
}

Installation​

info

This package is automatically available with conjoon.

$ npm i @conjoon/extjs-app-imapuser

If you want to develop with this package, run the build:dev-script:

$ npm run build:dev

Testing environment will then be available via

$ npm test

Configuring Sencha Ext JS​

Make sure your ExtJS workspace.json is properly configured to look up local repositories in the node_modules-directory.

workspace.json
{
"packages": {
"dir": "${workspace.dir}/node_modules/@l8js,${workspace.dir}/node_modules/@conjoon,...",
"extract": "${workspace.dir}/packages/remote"
}
}

Update the app.json of the application by specifying this package in the uses-property in either the development and/or production section:

app.json
{
"development": {
"uses": [
"extjs-dev-localmailaccount",
"extjs-app-webmail",
"extjs-dev-webmailsim"
]
},
"production": {
"uses": [
"extjs-dev-localmailaccount",
"extjs-app-webmail"
]
}
}

Configuration​

extjs-app-localmailaccount is a coon.js package and is tagged as such in its package.json:

package.json
{
"coon-js": {
"package": {
"autoLoad": {
"registerController": true
},
"config": "${package.resourcePath}/extjs-app-localmailaccount.conf.json"
}
}
}

By default, this package's configuration can be found in this package's resources folder in a file named extjs-app-localmailaccount.conf.json.

What goes into an extjs-app-localmailaccount configuration?​

conjoon.conf.json

The following can be applied directly to conjoon.conf.json. Refer to the configuration guide!

The package allows users to maintain an arbitrary number of IMAP accounts using Local Storage. Connection information will be send along with the payload of the individual requests.

The configuration for this package provides various fields:

{
"title": "Local Email Accounts",
"interceptUri": "\\/MailAccounts\\/?[^\\/]*$",
"ioc": {
"bindings": {
"conjoon.dev.cn_mailsim": {
"conjoon.dev.cn_mailsim.data.SimletAdapter": "conjoon.localmailaccount.dev.BasicAuthSimletAdapter"
},
"conjoon.cn_mail": {
"coon.core.data.request.Configurator": {
"xclass": "conjoon.localmailaccount.data.request.Configurator",
"singleton": true
}
}
}
}
}
  • title - The title of the package. This is used for assembling navigation entries, or changing the document.title of the browser instance the application runs in. This package notifies interested observers with this title whenever view of the package gets activated and gains the focus.

  • interceptUri - The URI the package should intercept when reading/writing MailAccounts so commands are redirected to this package's LocalStorage-API

  • ioc - Bindings for the Inversion of Control-Container used with extjs-app-localmailaccount.