npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

esf-eml-rcv

v1.1.1

Published

ESF E-mail Receiver

Downloads

2

Readme

ESF E-mail Receiver

Promised-based wrapper over imap, configured via esfcfg.json or in-memory config Object.

Example

const 
  App   =require('../index.js').EmlRcv,
  cfgObj={
    schemaVersion:'0.5.0',
    pcs:          {
      totalTimeout: 7200000,
      portion:      100000
    },
    imap:         {
      user:    '{USER_LOGIN}',
      password:'{USER_PASSWORD}',
      host:    '{IMAP_HOST}',
      port:    IMAP_PORT,
      tls:     true
    },
    rules:        {
      flag:'UNSEEN',
      from:                {
        addr:       'all',
        regex:      '',
        list:       []
      },
      dateRange:           {
        since:'2015-06-30 00:00:00',
        till: '2017-07-01 23:59:59'
      },
      attachmentTypes:     [
        'application'
      ],
      attachmentSubtypes:  [
        'x-excel'
      ],
      attachmentExtensions:[
        'xls'
      ]
    },
    local:        {
      clearPaths:false,
      path:      'tst/d/eml/rcv/',
      subDirs:   {
        raw:'raw/',
        att:'att/',
        unm:'unm/'
      }
    }
  }
  ;

app
  .run(cfgObj)
  .then(r=>{
    done();
  })
  .catch(e=>{
    done(e);
  })
;

Road map

Version | Functionality | Status | Implemented Methods ------- | ------------------------------------------------------------------------------------------------------------ | -------- | ------------------- 0.1.0 | Check mail and save attachments (req: esf-eml-rcv-1.1, esf-eml-rcv-1.2 | released | receiveMail 0.2.0 | Fetch by portions (req. esf-eml-rcv-1.3) | | checkMail 1.0.0 | API v.1.0 esf-eml-rcv-1.0 | | reloadConfig 1.1.0 | API v.1.1 esf-eml-rcv-1.0 | | reloadConfig

Requirements

esf-eml-rcv-1

ReqId | Requirement --------------- | ------------------------------------------------------------------------- esf-eml-rcv-0.1 | It should have configurable time intervals for mails esf-eml-rcv-0.2 | It should save attachments from mails, according set of mime-types esf-eml-rcv-0.3 | It should save other attachments according extension into separate folder esf-eml-rcv-0.4 | It should fetch mail by portions, sized in config esf-eml-rcv-1.0 | It should implement API 1.0 esf-eml-rcv-1.1 | It should have an option to copy saved files to persistent place esf-eml-rcv-1.2 | It should run the complete activity flow with a single method

API

v.1.1

class EmlRcv extends Bsc {
  Promise run([string pathToConfigFile|object configObject])          // runs complete activity flow
  Promise reloadConfig([string pathToConfigFile|object configObject]) //inherited
  Promise getCurrentDateTime()
  Promise createFolders(string folderName)
  Promise processMessage(integer msgId, Buffer buffer, string opDir)
  Promise initMailBox()
  Promise checkMail(imap)
  Promise receiveMail(operationDir,searchResultPortion,imap)
  Promise splitMessagesRangeAndFetch(operationDir,searchResult,imap)
}

API v.1.0

class EmlRcv extends Bsc {
  Promise reloadConfig([string pathToConfigFile]) //inherited
  Promise checkMail()
  Promise receiveMail(string operationDir)
}

© MIT bondden 2009-2016