diff --git a/controllers/user.js b/controllers/user.js index d0d2efa..d4ab41e 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -120,8 +120,6 @@ exports.setting = function (req, res, next) { profile: data.profile, weibo: data.weibo, githubUsername: data.github || data.githubUsername, - receive_at_mail: data.receive_at_mail, - receive_reply_mail: data.receive_reply_mail }; if (isSuccess) { data2.success = msg; @@ -157,8 +155,6 @@ exports.setting = function (req, res, next) { if (github.indexOf('@') === 0) { github = github.slice(1); } - var receive_at_mail = req.body.receive_at_mail === 'on'; - var receive_reply_mail = req.body.receive_reply_mail === 'on'; if (url !== '') { try { @@ -194,8 +190,6 @@ exports.setting = function (req, res, next) { user.profile = profile; user.weibo = weibo; user.githubUsername = github; - user.receive_at_mail = receive_at_mail; - user.receive_reply_mail = receive_reply_mail; user.save(function (err) { if (err) { return next(err); diff --git a/services/mail.js b/services/mail.js index 4b08da0..77e29c8 100644 --- a/services/mail.js +++ b/services/mail.js @@ -81,6 +81,8 @@ exports.sendResetPassMail = function (who, token, name) { * @param {Object} msg 发送的消息对象 */ exports.sendReplyMail = function (who, msg) { + return; // !!!关闭发送通知邮件 + var from = util.format('%s <%s>', config.name, config.mail_opts.auth.user); var to = who; var subject = config.name + ' 新消息'; @@ -110,10 +112,13 @@ exports.sendReplyMail = function (who, msg) { * @param {Object} msg 发送的消息对象 */ exports.sendAtMail = function (who, msg) { + return; // !!!关闭发送at通知邮件 + + if (!msg.topic || !msg.reply) { return; } - + var from = util.format('%s <%s>', config.name, config.mail_opts.auth.user); var to = who; var subject = config.name + ' 新消息'; diff --git a/views/user/setting.html b/views/user/setting.html index 1d5cb26..67173f6 100644 --- a/views/user/setting.html +++ b/views/user/setting.html @@ -96,27 +96,6 @@ <% } %> -
- -
- - -
-