Commit 8d19f6e5 authored by Liang Ding's avatar Liang Ding

Fix #12558

parent dd408a22
...@@ -43,7 +43,7 @@ import org.json.JSONObject; ...@@ -43,7 +43,7 @@ import org.json.JSONObject;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://www.wanglay.com">Lei Wang</a> * @author <a href="http://www.wanglay.com">Lei Wang</a>
* @version 1.2.2.11, Sep 25, 2018 * @version 1.2.2.12, Oct 23, 2018
* @since 0.3.1 * @since 0.3.1
*/ */
@Singleton @Singleton
...@@ -129,27 +129,27 @@ public class ArticleCommentReplyNotifier extends AbstractEventListener<JSONObjec ...@@ -129,27 +129,27 @@ public class ArticleCommentReplyNotifier extends AbstractEventListener<JSONObjec
commenter = commentName; commenter = commentName;
} }
final String mailSubject = replyNotificationTemplate.getString( final String mailSubject = replyNotificationTemplate.getString(
"subject").replace("${postLink}", articleLink) "subject").replace("${postLink}", articleLink).
.replace("${postTitle}", articleTitle) replace("${postTitle}", articleTitle).
.replace("${replier}", commenter) replace("${replier}", commenter).
.replace("${blogTitle}", blogTitle) replace("${blogTitle}", blogTitle).
.replace("${replyURL}", replace("${replyURL}", Latkes.getServePath() + commentSharpURL).
Latkes.getServePath() + commentSharpURL) replace("${replyContent}", commentContent).
.replace("${replyContent}", commentContent); replace("${servePath}", Latkes.getServePath());
message.setSubject(mailSubject); message.setSubject(mailSubject);
final String mailBody = replyNotificationTemplate final String mailBody = replyNotificationTemplate.
.getString("body") getString("body").
.replace("${postLink}", articleLink) replace("${postLink}", articleLink).
.replace("${postTitle}", articleTitle) replace("${postTitle}", articleTitle).
.replace("${replier}", commenter) replace("${replier}", commenter).
.replace("${blogTitle}", blogTitle) replace("${blogTitle}", blogTitle).
.replace("${replyURL}", replace("${replyURL}", Latkes.getServePath() + commentSharpURL).
Latkes.getServePath() + commentSharpURL) replace("${replyContent}", commentContent).
.replace("${replyContent}", commentContent); replace("${servePath}", Latkes.getServePath());
message.setHtmlBody(mailBody); message.setHtmlBody(mailBody);
LOGGER.log(Level.DEBUG, "Sending a mail[mailSubject={0}, mailBody=[{1}] to [{2}]", LOGGER.log(Level.DEBUG, "Sending a mail [mailSubject={0}, mailBody=[{1}] to [{2}]",
mailSubject, mailBody, originalCommentEmail); mailSubject, mailBody, originalCommentEmail);
mailService.send(message); mailService.send(message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment