diff --git a/private/app/App.js b/private/app/App.js index ead0814..2e6912a 100644 --- a/private/app/App.js +++ b/private/app/App.js @@ -25,7 +25,8 @@ const Configuration = require('./../config/Configuration'), DatabaseConnection = require('./../database/DatabaseConnection'), - Server = require('./../server/Server') + Server = require('./../server/Server'), + Email = require('./../email/Email') ; class App { @@ -33,12 +34,14 @@ class App { this.config = new Configuration(this); this.database = new DatabaseConnection(this); this.server = new Server(this); + this.email = new Email(this); } getConfig() { return this.config; } getDiscord() { return this.discord; } getDatabase() { return this.database; } getPalaise() { return this.palaise; } + getEmail() {return this.email;} async init() { this.log('Starting App...'); @@ -63,6 +66,16 @@ class App { return; } + //Connect to Email + this.log('Connecting to Email...'); + try { + this.email.connect(); + } catch(e) { + this.error('Failed to connect to email!'); + this.error(e); + return; + } + //Start the server this.log('Starting Server...'); try { diff --git a/public/index.html b/public/index.html index 829b6ec..4693ad8 100644 --- a/public/index.html +++ b/public/index.html @@ -2,6 +2,7 @@