kazana-email-box plugin
Kazana service to listen for emails and download them into a kzana database
Setup
git clone git@github.com:eHealthAfrica/kazana-email-box.git
cd kazana-email-box
npm install
Usage
moduleexports = name: 'myapp' version: '1.0.0' port: 5000 static: 'public' /* ... */ plugins: /* ... */ /* ... */
Configuration
In your .kazanarc file
[kazana-email-box]emailAccount = "me@gmail.com":password@imap.gmail.com: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.