kazana-email-box
v2.2.1
Published
Downloads Email attachments into a kazana database
Downloads
33
Readme
kazana-email-box plugin
Kazana service to listen for emails and download them into a kzana database
Setup
git clone [email protected]:eHealthAfrica/kazana-email-box.git
cd kazana-email-box
npm install
Usage
module.exports = {
name: 'myapp',
version: '1.0.0',
port: 5000,
static: 'public',
/* ... */,
plugins: [
require('@ehealthafrica/kazana-email-box')
/* ... */
],
/* ... */
}
Configuration
In your .kazanarc file
[kazana-email-box]
emailAccount = "[email protected]":[email protected]:993 ; email account configuration
cacheDirectory = ./file_cache ; directory to store intermediate download and unzipped files
days = 40 ; days the downloader should look back to on restart
timeout = 900000 ; timeout for connecting and quer
pollingBreak = 100000 ; timeout between polling of downloading attachments
filenameFilter = ^[^\.](.+\.xls.?)|(.+\.zip)$ ; filename regex of what attachments to handle
Test
TODO: tests: multiple zip files, test multiple xls and mixed
TODO: tests: auth timout should skip checkpointing
npm test
Credit
Brought to you by eHealth Africa — good tech for hard places.