mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 08:52:15 -05:00
browserify of inbox works now
This commit is contained in:
parent
fac2835263
commit
90d0fdf504
52
gmail-test-proxy/browserify-test.js
Normal file
52
gmail-test-proxy/browserify-test.js
Normal 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
15
gmail-test-proxy/foo.html
Normal 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>
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user