diff --git a/gmail-test-proxy/browserify-test.js b/gmail-test-proxy/browserify-test.js new file mode 100644 index 0000000..6e8b13f --- /dev/null +++ b/gmail-test-proxy/browserify-test.js @@ -0,0 +1,52 @@ +'use strict'; + +var inbox = require('inbox'); + +var client = inbox.createConnection(false, "imap.gmail.com", { + secureConnection: true, + auth: { + XOAuth2: { + user: "safewithme.testuser@gmail.com", + clientId: "440907777130.apps.googleusercontent.com", + accessToken: "ya29.AHES6ZTVj9_kCdP8zEYCA9OZ6fvTqT_TmCe4UsmYPF3ffYM8eGHX2uw" + } + } + // auth: { + // user: "safewithme.testuser@gmail.com", + // pass: "hellosafe" + // } +}); + +console.log("Connecting to server..."); +client.connect(); + +client.on("connect", function() { + + console.log("Connected!"); + + // client.openMailbox("INBOX", function(error, mailbox) { + // if (error) throw error; + + // // List newest 10 messages + // client.listMessages(-10, function(err, messages) { + // console.log("Listing messages server..."); + // messages.forEach(function(message) { + // console.log(message.UID); + // // client.createMessageStream(message.UID).pipe(process.stdout, { + // // end: false + // // }); + // }); + + // client.close(); + // }); + // }); +}); + +// client.on('error', function(err) { +// console.log('Error'); +// console.log(err) +// }); + +// client.on('close', function() { +// console.log('DISCONNECTED!'); +// }); \ No newline at end of file diff --git a/gmail-test-proxy/foo.html b/gmail-test-proxy/foo.html new file mode 100644 index 0000000..50aa816 --- /dev/null +++ b/gmail-test-proxy/foo.html @@ -0,0 +1,15 @@ + + + + + Example + + + + + + + + + + \ No newline at end of file diff --git a/gmail-test-proxy/package.json b/gmail-test-proxy/package.json index db69d53..98d0163 100644 --- a/gmail-test-proxy/package.json +++ b/gmail-test-proxy/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "express": "~3.2.4", - "inbox": "~0.1.30", + "inbox": "https://github.com/whiteout-io/inbox/tarball/iconv-lite", "nodemailer": "~0.4.3" }, "devDependencies": {