Meteor.methods({
	startEmailIntercepter() {
		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()) {
					RocketChat.IMAP = new RocketChat.IMAPIntercepter({
						user: RocketChat.settings.get('Direct_Reply_Username'),
						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 {
					throw new Meteor.Error('IMAP_intercepter_already_running');
				}
			}
		} else {
			throw new Meteor.Error('Please_fill_all_the_information');
		}
	}
});

@@ -458,16 +458,17 @@
 e%0A%09%09%09%09if
+ 
 (RocketC
@@ -539,47 +539,671 @@
 top(
-);%0A%09%09%09%09%7D%0A%09%09%09%09// start new instance%0A%09%09%09%09
+Meteor.bindEnvironment(function() %7B%0A%09%09%09%09%09%09RocketChat.IMAP = new RocketChat.IMAPIntercepter(%7B%0A%09%09%09%09%09%09%09user: RocketChat.settings.get('Direct_Reply_Username'),%0A%09%09%09%09%09%09%09password: RocketChat.settings.get('Direct_Reply_Password'),%0A%09%09%09%09%09%09%09host: RocketChat.settings.get('Direct_Reply_Host'),%0A%09%09%09%09%09%09%09port: RocketChat.settings.get('Direct_Reply_Port'),%0A%09%09%09%09%09%09%09debug: RocketChat.settings.get('Direct_Reply_Debug') ? console.log : false,%0A%09%09%09%09%09%09%09tls: !RocketChat.settings.get('Direct_Reply_IgnoreTLS'),%0A%09%09%09%09%09%09%09connTimeout: 30000,%0A%09%09%09%09%09%09%09keepalive: true%0A%09%09%09%09%09%09%7D);%0A%09%09%09%09%09%09RocketChat.IMAP.start();%0A%09%09%09%09%09%09return %7B%0A%09%09%09%09%09%09%09message: 'Direct_Reply_Started'%0A%09%09%09%09%09%09%7D;%0A%09%09%09%09%09%7D));%0A%09%09%09%09%7D else 
 if (

fix start