1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-29 20:32:15 -05:00

browserify of inbox works now

This commit is contained in:
Tankred Hase 2013-08-01 18:56:27 +02:00
parent fac2835263
commit 90d0fdf504
3 changed files with 68 additions and 1 deletions

View File

@ -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!');
// });

15
gmail-test-proxy/foo.html Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The Scripts -->
<script src="foo.js"></script>
</head>
<body>
</body>
</html>

View File

@ -9,7 +9,7 @@
}, },
"dependencies": { "dependencies": {
"express": "~3.2.4", "express": "~3.2.4",
"inbox": "~0.1.30", "inbox": "https://github.com/whiteout-io/inbox/tarball/iconv-lite",
"nodemailer": "~0.4.3" "nodemailer": "~0.4.3"
}, },
"devDependencies": { "devDependencies": {