Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Integrated personal email gateway (GSoC'17) #7342

Merged
merged 65 commits into from
Aug 22, 2017
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5e8a23a
Merge pull request #2 from RocketChat/develop
pkgodara Jun 8, 2017
a39ca5e
Phase-I
pkgodara Jun 13, 2017
c5e9905
Phase-I
pkgodara Jun 13, 2017
eaac7fb
Updated email footer
pkgodara Jun 14, 2017
61aa422
IMAP implementation. Received emails & reply message
pkgodara Jun 22, 2017
d428eb0
improved email footer
pkgodara Jun 22, 2017
c818311
extract email info
pkgodara Jun 22, 2017
df8b8da
Email sending refactored.Reply-To along with Message-ID for backup
pkgodara Jun 23, 2017
8883de3
remove unwanted deps
pkgodara Jun 23, 2017
da8e0a4
Constraint IMAP info & show error
pkgodara Jun 23, 2017
585623b
fix eslint
pkgodara Jun 25, 2017
75ebf82
resolve conflict in package.json
pkgodara Jun 25, 2017
5b7c0f6
fix eslint
pkgodara Jun 25, 2017
06ba639
resolve conflict in package.json
pkgodara Jun 25, 2017
3ea675c
resolve conflict
pkgodara Jun 25, 2017
2b64c84
Merge branch 'develop' into gsoc17
pkgodara Jun 26, 2017
cc32ba4
supporting comments
pkgodara Jun 26, 2017
b4e80b7
imap info Bug fix
pkgodara Jul 2, 2017
1ab89bc
imap => direct_reply, settings
pkgodara Jul 2, 2017
b60b1f1
meteor fiber error
pkgodara Jul 2, 2017
3219105
codecy fix
pkgodara Jul 2, 2017
41aaae5
send Message
pkgodara Jul 5, 2017
8bbe667
Merge branch 'develop' into gsoc17
pkgodara Jul 5, 2017
923103e
fix eslint
pkgodara Jul 5, 2017
4128ae6
fix eslint
pkgodara Jul 5, 2017
9e7d70f
fix eslint
pkgodara Jul 5, 2017
e4bbcb7
reduce new-lines
pkgodara Jul 5, 2017
feb8287
Object oriented IMAP & Control IMAP
pkgodara Jul 8, 2017
6260033
remove extra logs
pkgodara Jul 8, 2017
0bbda5e
fix eslint
pkgodara Jul 8, 2017
beff246
Added email message info
pkgodara Jul 10, 2017
e72ba62
i18n for toastr messages
pkgodara Jul 11, 2017
d73629d
fix select values
pkgodara Jul 11, 2017
00d4810
fix settings, unnecessary lint
pkgodara Jul 13, 2017
6d08dbc
fix unnecessary lint
pkgodara Jul 13, 2017
953d1e2
intercepter start on save settings
pkgodara Jul 13, 2017
252279e
fix start
pkgodara Jul 13, 2017
b400c39
fix class definition, config, onload
pkgodara Jul 13, 2017
3048a02
fix email sending, import, callbacks
pkgodara Jul 13, 2017
03a7d1c
callbacks to arrow functions
pkgodara Jul 13, 2017
9a7dfd3
using class variables
pkgodara Jul 13, 2017
72dc724
direct callback
pkgodara Jul 13, 2017
fb58ea8
Icon to identify messages sent by emails
pkgodara Jul 14, 2017
7bc6631
Icon to identify messages sent by emails
pkgodara Jul 14, 2017
1d7f266
use common property name
pkgodara Jul 14, 2017
88e0978
POP3 implementation
pkgodara Jul 23, 2017
3350e43
fix eslint
pkgodara Jul 23, 2017
3e20101
Merge branch 'develop' into gsoc17
pkgodara Jul 23, 2017
aed2ab8
fix eslint
pkgodara Jul 23, 2017
d2296d6
fix imap to pop swap issue
pkgodara Jul 23, 2017
98a820d
allow email subject editing
pkgodara Jul 24, 2017
8ef220c
using import, export replacing globals
pkgodara Jul 30, 2017
01262cc
Merge branch 'develop' into gsoc17
pkgodara Jul 30, 2017
c93aecf
toplevel import, export
pkgodara Jul 30, 2017
aae9e98
remove older i18n translations
pkgodara Aug 2, 2017
3517ae0
Merge branch 'develop' into gsoc17
pkgodara Aug 2, 2017
747d503
Merge branch 'develop' into gsoc17
pkgodara Aug 11, 2017
3bd791a
message ts sync & email subject editing
pkgodara Aug 12, 2017
70c5c27
fix POP intercepter
pkgodara Aug 12, 2017
d1573c5
fix mention all subject editing
pkgodara Aug 12, 2017
c3a9a5e
IMAP delete emails option
pkgodara Aug 16, 2017
af1b739
settings for custom Separator
pkgodara Aug 16, 2017
9909728
replace tag if exists in email provided
pkgodara Aug 17, 2017
7724061
Merge branch 'develop' into gsoc17
pkgodara Aug 22, 2017
3646237
Merge branch 'develop' into gsoc17
rodrigok Aug 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix start
pkgodara committed Jul 13, 2017
commit 252279eb4edab2801da8e9c1d89a660766fb6d68
23 changes: 18 additions & 5 deletions packages/rocketchat-lib/server/methods/startEmailIntercepter.js
Original file line number Diff line number Diff line change
@@ -3,11 +3,24 @@ Meteor.methods({
if (RocketChat.settings.get('Direct_Reply_Enable') && RocketChat.settings.get('Direct_Reply_Protocol') && RocketChat.settings.get('Direct_Reply_Host') && RocketChat.settings.get('Direct_Reply_Port') && RocketChat.settings.get('Direct_Reply_Username') && RocketChat.settings.get('Direct_Reply_Password')) {
if (RocketChat.settings.get('Direct_Reply_Protocol') === 'IMAP') {
// stop already running instance
if(RocketChat.IMAP && RocketChat.IMAP.isActive()) {
RocketChat.IMAP.stop();
}
// start new instance
if (!RocketChat.IMAP || !RocketChat.IMAP.isActive()) {
if (RocketChat.IMAP && RocketChat.IMAP.isActive()) {
RocketChat.IMAP.stop(Meteor.bindEnvironment(function() {
RocketChat.IMAP = new RocketChat.IMAPIntercepter({
user: RocketChat.settings.get('Direct_Reply_Username'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not get the config from settings inside the RocketChat.IMAPIntercepter constructor? Then you don't need to duplicate the code to configure

password: RocketChat.settings.get('Direct_Reply_Password'),
host: RocketChat.settings.get('Direct_Reply_Host'),
port: RocketChat.settings.get('Direct_Reply_Port'),
debug: RocketChat.settings.get('Direct_Reply_Debug') ? console.log : false,
tls: !RocketChat.settings.get('Direct_Reply_IgnoreTLS'),
connTimeout: 30000,
keepalive: true
});
RocketChat.IMAP.start();
return {
message: 'Direct_Reply_Started'
};
}));
} else if (!RocketChat.IMAP || !RocketChat.IMAP.isActive()) {
RocketChat.IMAP = new RocketChat.IMAPIntercepter({
user: RocketChat.settings.get('Direct_Reply_Username'),
password: RocketChat.settings.get('Direct_Reply_Password'),