{"_id":"mail-notifier","_rev":"33-e9c0e203c47a1545be56c95d2cdccbaf","name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.1.0","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.3.1","mailparser":"~0.2.24","seq":"~0.3.5"},"main":"./index.js","engines":{"node":"~0.6.9"},"devDependencies":{},"_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"_id":"mail-notifier@0.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.19","_nodeVersion":"v0.6.16","_defaultsLoaded":true,"dist":{"shasum":"810b9616c88438bd168e134a0163ea3bfea2ee8d","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.1.0.tgz","integrity":"sha512-8sjCAKsWWikNNEHNUhwNnlOOFPw7i4dKlDH3IYbxnSlaEimpl+pA9aRymliF05MkUfq9bPGt0899WCbGixwdvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+jOU/MUJzPJiSodliBSf5uxjWLiwbo6+BY++LEdnPkAiEA8j3k98yT3Aw1Tqmv9YpbtU5OVLbwwLNKHhlZ59Sc37E="}]},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.1.1":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.1.1","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.3.1","mailparser":"~0.4","seq":"~0.3.5"},"main":"./index.js","engines":{"node":"~0.6.9"},"devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"_id":"mail-notifier@0.1.1","dist":{"shasum":"e471332d0a79f97f1bfbc985682cdd550553ecc8","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.1.1.tgz","integrity":"sha512-R8NEhNBQ0O32kGBtIu2hCzzroiZmEAPB08lMv1HUby1bi6kK2rNYmRJqlEsmSjJ7YBwo21gvTuXIj/rfjECzXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLJm5wL/qRE7gpwIfv5pK+K8a19liLRvWIk4rHdMuZbAIgfhJWsPfxKWvwDE4A85P6kuED+hJsiBZWijbRlVfYPK4="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.0":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.0","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"_id":"mail-notifier@0.2.0","dist":{"shasum":"6fb7280eb0ca06ef6faf2e6ddd330ce2c41c107b","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.0.tgz","integrity":"sha512-N7BJtP/skqwV7L0qgyHgtzqUnr+lGsw7F2aQU8mH8J/0/0aHTP7M6IBs6tV9znuArqT0zyEfuuZiJAdgtQnRgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbedIAE1umEOR0sVf+1kjVa2s4uKJ+RbqIK5MwgkL37wIgKy2oUpLi3HeDnk/C9eS/tpEqGgnO3gSzWGeB7p9H62k="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.1":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.1","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"_id":"mail-notifier@0.2.1","dist":{"shasum":"c506f287ba069f7f533180751dcb506303e0da69","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.1.tgz","integrity":"sha512-EaYGTzZH9ZM9lsIKZJHFzbOpfYb6rTmgi1/NupCBO+UGFQInC4WeUTSEI65Hb/ZcuBxBnNf+gmi30ws5NlMn/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC07oaCv4x33UmtRQp1zpxj6//xIoA0MVUPXJWb4L401QIhAMjNqeAYS1AWyWSQzYz6lAy42Gx6R6x71BBL0JLsScHW"}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.2":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.2","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier","_id":"mail-notifier@0.2.2","dist":{"shasum":"53cf86e1459e9d42da278e6f76a5f7812a429be7","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.2.tgz","integrity":"sha512-KCR3R7F2oJzsVvbZ8JzH/InrmVwRWSiiP9NLUQlpnE7tcQKXl/PAyZoprX25wOKFKB06s8Db1HuTjojIVZG+Mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrHu6p3do7O4L9gxYVHdJYJpE1RQHTsPRxUpcw5g2oEAiAVyZ1HBZUmybCMAtUzXC4BuzXIvqq1sic9PzniG6I2fQ=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.3":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.3","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"_id":"mail-notifier@0.2.3","dist":{"shasum":"5c6215ac771df5452cfa8f4a63880496a1ba498c","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.3.tgz","integrity":"sha512-T5Z5WAGPd11rslYCXvaT4JtXztR+1dKulQzGdF6WNadcG6Q9SOhEYZ3Sdju+6nAFvle8otSudpcpEXipwIoeqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHR7HyGPFbNanAfK0ekfTaIULNBOC6gTbbIXfqfBd3UrAiBMcnPGOK633PurVPEjGE2IYoJNPZYH4q2kRQQz9P2Ywg=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.4":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.4","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier","_id":"mail-notifier@0.2.4","dist":{"shasum":"26f7b23c607d547aa5e3d4d0bad9c89a89f04e88","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.4.tgz","integrity":"sha512-hQ2+A0Sl3XcngtpcODTMbsBFfNeIzqyP6A9VOEUZeiZLOg0clAxp8DqzwJXxDbGRbeL+kDl+n1NwDQJ4HaSpUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7eCl6IWWqCeHMmN0KGAu1B4yq1VV0+Xyr7411xRLreAiAwBQDw9w/szdz4cNlf6Rcq4ZjEnYBn8CL4S1lDiQwjjw=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{}},"0.2.5":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.2.5","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"debug":"^2.2.0","imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"gitHead":"2599f86af4ecf7a460ff33e1be17224952769252","bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","_id":"mail-notifier@0.2.5","scripts":{},"_shasum":"e5f3a57e2606fcc45db48f69b793a5799e4d84b5","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"dist":{"shasum":"e5f3a57e2606fcc45db48f69b793a5799e4d84b5","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.2.5.tgz","integrity":"sha512-nTrmo70SU8MdhOC2H642PxxNk8VvXfKUQT0mG9d8Sut2fzdh6nBxA0wlYaykUbyauaBvnwGl3uxm3p0ugXRqIQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbZtb6KnHjUGXURJ65GkLiLkPuiWHd0LAUeKYOvPEEeAIhAKkOO1mzsYbNu10B7Qclwf1e9ovtDcnjKQh/wzM8gU/W"}]},"directories":{}},"0.3.0":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.3.0","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"debug":"^2.2.0","imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"gitHead":"2ebc849d335dda2399b1ea7ba66570d680dca547","bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","_id":"mail-notifier@0.3.0","scripts":{},"_shasum":"76b86ca2981ad16b3c7cb5f3eebf6566bf477aa5","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.1","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"dist":{"shasum":"76b86ca2981ad16b3c7cb5f3eebf6566bf477aa5","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.3.0.tgz","integrity":"sha512-Tpro/ggDCbleTnxREyX6neh9mlxAg+5L8tRAzSJ+NU0I8KWEbuCUSWawgtttkISeL+pM0quE6f0hYjLZBzsPlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTnClH1c0gsc3sZ5NhIa8hameJ2x0oRbfkRI9ulFgAhgIhAPa6IwEN0IyIXC32FveGVHFRXN5pAgcTJy6RbTAaP62P"}]},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/mail-notifier-0.3.0.tgz_1456609195301_0.8638877419289201"},"directories":{}},"0.4.0":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.4.0","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"debug":"^2.2.0","imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"gitHead":"c62e805c2a297f0cf4b4981b6f4a9d9560e3995a","bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","_id":"mail-notifier@0.4.0","scripts":{},"_shasum":"06558a1c1659bd664d3ab03a1d115d23193e0fae","_from":".","_npmVersion":"4.2.0","_nodeVersion":"4.4.7","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"dist":{"shasum":"06558a1c1659bd664d3ab03a1d115d23193e0fae","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.4.0.tgz","integrity":"sha512-K5dxbZ90GLJO/ypIGL8POwqte/E0/QWuCffUTXHSd7aW8rFFOxss4EO4/54LDP6d13aNY70C9RFdKoiq+IbeEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPjl6T/HD3+6MAvivqtQnYdD11U1or8qfxgIsUWFSw1AiBRGs1gG2MPBUmq3ZQXy6BrG1kZLcsX2Q8S+TWFZdbsrQ=="}]},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mail-notifier-0.4.0.tgz_1498463300251_0.24225484766066074"},"directories":{}},"0.4.1":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.4.1","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"debug":"^2.2.0","imap":"~0.8.9","mailparser":"~0.4"},"main":"./index.js","devDependencies":{},"gitHead":"d428c6457787463e96d78f2a9ff99065ed5fb8cf","bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","_id":"mail-notifier@0.4.1","scripts":{},"_shasum":"5df32888b8287f0424c12bd7c66c988da67306fe","_from":".","_npmVersion":"4.2.0","_nodeVersion":"4.4.7","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"dist":{"shasum":"5df32888b8287f0424c12bd7c66c988da67306fe","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.4.1.tgz","integrity":"sha512-WSec+7LQqzy4F/Yp3xKU5cL5CJfZpzDLj/glIJ1/NSmMbBb0NdM8xReeUcpzD9hZCS863IEsPMrX+Sd82MgbhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEVop2Q2jJEwq01aFZIgQWBPQPCom+vO1++pltXEuFkOAiEAwE51wRCCM4s5MD0VD14yGTrb1jb7DIKiTWoKkAOro4U="}]},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mail-notifier-0.4.1.tgz_1502560806158_0.13075415208004415"},"directories":{}},"0.5.0":{"name":"mail-notifier","description":"Nodejs library to get notified on new incoming email.","keywords":["imap","mail","notifier"],"version":"0.5.0","author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"dependencies":{"async":"^2.5.0","debug":"^2.2.0","imap":"~0.8.9","mailparser":"0.6.2"},"main":"./index.js","devDependencies":{},"gitHead":"283f3f45d30cbad081060a0e329ba4e3d09658fd","bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","_id":"mail-notifier@0.5.0","scripts":{},"_shasum":"6dcfa1162b7dac6ede8ecfc76605e6f6dbd7ef2b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.12.3","_npmUser":{"name":"jcreigno","email":"jerome.creignou@gmail.com"},"dist":{"shasum":"6dcfa1162b7dac6ede8ecfc76605e6f6dbd7ef2b","tarball":"https://registry.npmjs.org/mail-notifier/-/mail-notifier-0.5.0.tgz","fileCount":7,"unpackedSize":10415,"integrity":"sha512-jWO2nplukdCmfRaAt1vxaPRQ7kYtXdGl4YGPticiHt6lOPRkqzItkECcQu4LclM6o1oDhKXYlsORNcelZNayfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVHebeDzQiEQVXUlrM9XplIRipeblmMwud7t2PKvSxngIgESk2oY+laK3/PasPHhf6PntWYP+FrDn6BKjdJmpkd2Q="}]},"maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mail-notifier_0.5.0_1520893597342_0.8947447457781841"},"_hasShrinkwrap":false}},"readme":"mail-notifier\n=============\n\n> Notify your nodejs scripts of incoming imap mail.\n\nintroduction\n------------\nSend `mail` event for each new email in IMAP INBOX. \n\nsynopsis\n--------\nStart listening new mails :\n\n```javascript\nconst notifier = require('mail-notifier');\n\nconst imap = {\n  user: \"yourimapuser\",\n  password: \"yourimappassword\",\n  host: \"imap.host.com\",\n  port: 993, // imap port\n  tls: true,// use secure connection\n  tlsOptions: { rejectUnauthorized: false }\n};\n\nnotifier(imap)\n  .on('mail', mail => console.log(mail))\n  .start();\n```  \n\nKeep it running forever :\n\n```javascript\nconst n = notifier(imap);\nn.on('end', () => n.start()) // session closed\n  .on('mail', mail => console.log(mail.from[0].address, mail.subject))\n  .start();\n```\n\ninstallation\n------------\n\n    $ npm install mail-notifier\n\nAPI\n===\n\nnotifier(config, customDbg)\n----------------\nThe constructor function creates a new `notifier`. Parameter provide options needed for imap connection.\n`config` :\n\n* `host` :  imap server host\n* `port` :  imap server port number\n* `user` :  imap user name\n* `password` :  imap password\n* `tls` :  need a tle connection to server\n* `tlsOptions` : see `tls` module options\n* `markSeen`: mark mail as read defaults to true\n* `box` : mail box read from defaults to 'INBOX'\n* `search`: search query defaults to ['UNSEEN']\n* `connTimeout` : Number of milliseconds to wait for a connection to be established. Default: 10000\n* `authTimeout` : Number of milliseconds to wait to be authenticated after a connection has been established. Default: 5000\n* `debug`: *function* - if set, the function will be called with one argument, a string containing some debug info. Default: debug output if [enabled](#debugging).\n\nOptions from [node-imap](https://github.com/mscdex/node-imap#connection-instance-methods) are also avaliable.\n\nFor backward compatibility `username` is supported.\n\n`custommDbg`: *function* - if set, the function will be called with args that contain some mail-notifier debug info. Default: debug output if [enabled](#debugging).\n\nexample:\n```javascript\nconst n = notifier(config, (...args) => {\n  const msg = util.format(...args);\n  customLogFn(msg);\n});\n```\n\n.start()\n------------------------------------\nStart listening for incomming emails.\n\n.stop()\n------------------------------------\nStop listening and close IMAP connection.\n\nEvents\n======\n\n'connected'\n-----\nSent when a connection to the server has been made.\n\n'mail'\n-----\nSent on incoming new unread email. The parsed Mail is given as first parameter to the event listener.\n\n'error'\n-----\nSent when an error occurs with the IMAP connection. The first parameter is the `err` object.\n\n'end'\n-----\nSent when the IMAP connection is closed. This usually happens after a `stop` method call.\n\nDependencies\n============\n\nThis module relies heavily on [node-imap](https://github.com/mscdex/node-imap). For more advanced usage, please consider\nusing it directly.\n\n\nDebugging\n=========\n\nDebugging is enabled via the [visionmedia/debug](https://github.com/visionmedia/debug) module.\n\nTo enable debug info add `mailnotifier` to the DEBUG env variable :\n\n```sg\n$>DEBUG=mailnotifier node sample/simple-mail-notifier.js\n```\n\nOr to also have imap module debug info :\n\n```sg\n$>DEBUG=mailnotifier,imap node sample/simple-mail-notifier.js\n```\n\n","maintainers":[{"name":"jcreigno","email":"jerome.creignou@gmail.com"}],"time":{"modified":"2022-06-19T15:25:25.642Z","created":"2012-05-09T22:56:12.617Z","0.1.0":"2012-05-09T22:56:15.723Z","0.1.1":"2014-02-24T18:54:11.371Z","0.2.0":"2014-03-26T08:23:43.749Z","0.2.1":"2014-04-01T18:53:39.930Z","0.2.2":"2014-04-15T12:24:39.080Z","0.2.3":"2014-05-21T19:57:05.225Z","0.2.4":"2015-01-21T23:32:01.082Z","0.2.5":"2016-01-07T17:14:33.669Z","0.3.0":"2016-02-27T21:39:58.118Z","0.4.0":"2017-06-26T07:48:21.350Z","0.4.1":"2017-08-12T18:00:07.080Z","0.5.0":"2018-03-12T22:26:37.397Z"},"author":{"name":"jerome creignou","url":"https://github.com/jcreigno/nodejs-mail-notifier"},"repository":{"type":"git","url":"git://github.com/jcreigno/nodejs-mail-notifier.git"},"readmeFilename":"README.md","keywords":["imap","mail","notifier"],"bugs":{"url":"https://github.com/jcreigno/nodejs-mail-notifier/issues"},"homepage":"https://github.com/jcreigno/nodejs-mail-notifier#readme","users":{"talesbaz":true,"npratham":true,"actionklo":true}}