aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/EmailManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/EmailManager.java')
-rw-r--r--src/main/java/com/juick/EmailManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/EmailManager.java b/src/main/java/com/juick/EmailManager.java
index a62d31f3..62584273 100644
--- a/src/main/java/com/juick/EmailManager.java
+++ b/src/main/java/com/juick/EmailManager.java
@@ -68,6 +68,8 @@ public class EmailManager implements NotificationListener {
private ObjectMapper jsonMapper;
@Inject
private WebApp webApp;
+ @Value("${web_domain:localhost}")
+ private String webDomain;
@Value("${service_email:}")
private String serviceEmail;
@@ -145,7 +147,7 @@ public class EmailManager implements NotificationListener {
headers.put("In-Reply-To", String.format("<%d.%d@juick.com>", original.getMid(), original.getRid()));
}
}
- String plainText = webApp.renderPlaintext(formatPost(msg), formatUrl(msg)).orElseThrow(IllegalStateException::new);
+ String plainText = webApp.renderPlaintext(formatPost(msg, webDomain), formatUrl(msg)).orElseThrow(IllegalStateException::new);
String hash = userService.getHashByUID(userService.getUserByEmail(email).getUid());
String htmlText = webApp.renderHtml(MessageUtils.formatHtml(msg), formatUrl(msg), msg, hash).orElseThrow(IllegalStateException::new);
sendEmail(StringUtils.EMPTY, email, subject, plainText, htmlText, headers);