diff --git a/config/env/development.js b/config/env/development.js index df558e3d..0b4a64e9 100644 --- a/config/env/development.js +++ b/config/env/development.js @@ -57,13 +57,13 @@ module.exports = { sandbox: true }, mailer: { - from: process.env.MAILER_FROM || 'service.mine.pt@gmail.com', + from: process.env.MAILER_FROM || 'admin@mean.im', options: { - service: process.env.MAILER_SERVICE_PROVIDER || 'Gmail', + service: process.env.MAILER_SERVICE_PROVIDER || 'service name like as: Gmail', imap: process.env.MAILER_IMAP || 'imap.gmail.com', auth: { - user: process.env.MAILER_EMAIL_ID || 'service.mine.pt@gmail.com', - pass: process.env.MAILER_PASSWORD || 'minept740729' + user: process.env.MAILER_EMAIL_ID || 'example@gmail.com', + pass: process.env.MAILER_PASSWORD || 'mail password' } } }, diff --git a/config/env/torrents.js b/config/env/torrents.js index 431431c9..e723f9b9 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -15,20 +15,20 @@ module.exports = { * App & site settings * NOTE: you can change these value at anytime if you understand it * - * @name: site logo name - * @domain: site domain - * @admin: site admin mail address - * @mailTicketService: settings mailTicketService status, true is enable, false is disable - * @showDemoWarningPopup: if is demo site, show warning popup whene home is opened for the first time. - * @cronTimeZone: timezone of cron - * @showDebugLog: if true, will console.log all debug info at server side and client side. when your site is prod env, please change this - * value to false, then console.log info is not output + * @name: site logo name + * @domain: site domain + * @admin: site admin mail address + * @mailTicketSupportService: settings mailTicketService status, true is enable, false is disable + * @showDemoWarningPopup: if is demo site, show warning popup whene home is opened for the first time. + * @cronTimeZone: timezone of cron + * @showDebugLog: if true, will console.log all debug info at server side and client side. when your site is prod env, please change this + * value to false, then console.log info is not output */ app: { name: 'MEAN.im', domain: 'http://localhost:3000', admin: 'admin@mean.im', - mailTicketService: true, + mailTicketSupportService: true, showDemoWarningPopup: true, cronTimeZone: 'Asia/Shanghai', showDebugLog: false diff --git a/config/lib/cron-job.js b/config/lib/cron-job.js index be49d31f..60392c91 100644 --- a/config/lib/cron-job.js +++ b/config/lib/cron-job.js @@ -67,7 +67,7 @@ module.exports = function (app) { cronJobs.push(removeGhostPeers()); cronJobs.push(countUsersHnrWarning()); - if (appConfig.mailTicketService) { + if (appConfig.mailTicketSupportService) { cronJobs.push(listenServiceEmail()); } @@ -296,8 +296,8 @@ function listenServiceEmail() { subTicket.messageId = mail_object.messageId; subTicket.from = mail_object.from.text; subTicket.to = config.mailer.options.auth.user; - subTicket.title = mail_object.subject; - subTicket.content = mail_object.text; + subTicket.title = mail_object.subject || 'Null title'; + subTicket.content = mail_object.text || 'Null content'; m._replies.push(subTicket); m.save(function (err) { @@ -319,8 +319,8 @@ function listenServiceEmail() { newTicket.messageId = mail_object.messageId; newTicket.from = mail_object.from.text; newTicket.to = config.mailer.options.auth.user; - newTicket.title = mail_object.subject; - newTicket.content = mail_object.text; + newTicket.title = mail_object.subject || 'Null title'; + newTicket.content = mail_object.text || 'Null content'; newTicket.save(function (err) { if (err) {