mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 02:42:17 -05:00
[WO-316] imap-client works
This commit is contained in:
parent
7e8c0d75b8
commit
834e0434d5
11
Gruntfile.js
11
Gruntfile.js
@ -127,8 +127,17 @@ module.exports = function(grunt) {
|
||||
src: [
|
||||
'requirejs/require.js',
|
||||
'imap-client/src/*.js',
|
||||
'imap-client/node_modules/browserbox/src/*.js',
|
||||
'imap-client/node_modules/browserbox/node_modules/imap-handler/src/*.js',
|
||||
'imap-client/node_modules/browserbox/node_modules/mimefuncs/src/*.js',
|
||||
'imap-client/node_modules/browserbox/node_modules/mimefuncs/node_modules/stringencoding/dist/stringencoding.js',
|
||||
'imap-client/node_modules/browserbox/node_modules/tcp-socket/src/*.js',
|
||||
'imap-client/node_modules/browserbox/node_modules/utf7/src/*.js',
|
||||
'mailreader/src/*.js',
|
||||
'pgpmailer/src/*.js',
|
||||
'mailreader/node_modules/mimeparser/src/*.js',
|
||||
'mailreader/node_modules/mimeparser/node_modules/addressparser/src/*.js',
|
||||
|
||||
'pgpmailer/src/*.js', /* TODO: copy sending deps */
|
||||
'pgpbuilder/src/*.js'
|
||||
],
|
||||
dest: 'src/lib/'
|
||||
|
@ -11,7 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/v0.1.1",
|
||||
"imap-client": "https://github.com/whiteout-io/imap-client/tarball/v0.2.0",
|
||||
"imap-client": "https://github.com/whiteout-io/imap-client/tarball/master",
|
||||
"mailreader": "https://github.com/whiteout-io/mailreader/tarball/v0.2.0",
|
||||
"pgpmailer": "https://github.com/whiteout-io/pgpmailer/tarball/v0.1.0",
|
||||
"pgpbuilder": "https://github.com/whiteout-io/pgpbuilder/tarball/v0.1.0",
|
||||
|
@ -6,9 +6,9 @@ define(function(require) {
|
||||
|
||||
var Auth = require('js/bo/auth'),
|
||||
PGP = require('js/crypto/pgp'),
|
||||
PgpMailer = require('pgpmailer'),
|
||||
/* PgpMailer = require('pgpmailer'), */
|
||||
OAuth = require('js/util/oauth'),
|
||||
PgpBuilder = require('pgpbuilder'),
|
||||
/* PgpBuilder = require('pgpbuilder'), */
|
||||
OutboxBO = require('js/bo/outbox'),
|
||||
mailreader = require('mailreader'),
|
||||
ImapClient = require('imap-client'),
|
||||
@ -71,7 +71,7 @@ define(function(require) {
|
||||
self._invitationDao = new InvitationDAO(restDao);
|
||||
self._keychain = keychain = new KeychainDAO(lawnchairDao, pubkeyDao);
|
||||
self._crypto = pgp = new PGP();
|
||||
self._pgpbuilder = pgpbuilder = new PgpBuilder();
|
||||
self._pgpbuilder = pgpbuilder = {}; //new PgpBuilder();
|
||||
emailSync = new EmailSync(keychain, userStorage);
|
||||
self._emailDao = emailDao = new EmailDAO(keychain, pgp, userStorage, pgpbuilder, mailreader, emailSync);
|
||||
self._outboxBo = new OutboxBO(emailDao, keychain, userStorage);
|
||||
@ -107,11 +107,8 @@ define(function(require) {
|
||||
var auth, imapOptions, imapClient, smtpOptions, pgpMailer;
|
||||
|
||||
auth = {
|
||||
XOAuth2: {
|
||||
user: credentials.emailAddress,
|
||||
clientId: config.gmail.clientId,
|
||||
accessToken: credentials.oauthToken
|
||||
}
|
||||
user: credentials.emailAddress,
|
||||
xoauth2: credentials.oauthToken
|
||||
};
|
||||
imapOptions = {
|
||||
secure: config.gmail.imap.secure,
|
||||
@ -131,7 +128,7 @@ define(function(require) {
|
||||
onError: console.error
|
||||
};
|
||||
|
||||
pgpMailer = new PgpMailer(smtpOptions, self._pgpbuilder);
|
||||
//pgpMailer = new PgpMailer(smtpOptions, self._pgpbuilder);
|
||||
imapClient = new ImapClient(imapOptions, mailreader);
|
||||
imapClient.onError = onImapError;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user