feat(config): rename configure item mailTicketService to mailTicketSupportService

This commit is contained in:
OldHawk
2018-04-03 11:13:34 +08:00
parent bc28d49521
commit 89a857fe96
3 changed files with 18 additions and 18 deletions

View File

@@ -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'
}
}
},

View File

@@ -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

View File

@@ -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) {