├── README-md ├── .travis.yml ├── package.json └── list.js /README-md: -------------------------------------------------------------------------------- 1 | # inbox-test 2 | 3 | Test inbox with travis -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - "0.10" 5 | - 0.11 6 | 7 | notifications: 8 | email: 9 | recipients: 10 | - andris@node.ee 11 | on_success: change 12 | on_failure: change 13 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inbox-test", 3 | "version": "0.0.0", 4 | "description": "ERROR: No README.md file found!", 5 | "main": "list.js", 6 | "scripts": { 7 | "test": "node list.js" 8 | }, 9 | "repository": "git@github.com:andris9/inbox-test.git", 10 | "author": "Andris Reinman", 11 | "license": "MIT", 12 | "dependencies":{ 13 | "inbox": "*" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /list.js: -------------------------------------------------------------------------------- 1 | var inbox = require("inbox"), 2 | util = require("util"); 3 | 4 | var client = inbox.createConnection(false, "imap.gmail.com", { 5 | secureConnection: true, 6 | auth:{ 7 | user: "node.inbox@gmail.com", 8 | pass: "Testikas123" 9 | }, 10 | debug: true 11 | }); 12 | 13 | client.connect(); 14 | 15 | client.on("connect", function(){ 16 | 17 | client.listMailboxes(console.log); 18 | 19 | client.openMailbox("INBOX", function(error, mailbox){ 20 | if(error) throw error; 21 | client.listMessages(0, function(err, messages){ 22 | client.close(); 23 | }); 24 | }); 25 | }); 26 | 27 | client.on('close', function (){ 28 | console.log('DISCONNECTED!'); 29 | }); 30 | --------------------------------------------------------------------------------