From bc73166142f8d6b28941f54d3a8d5f4351d4d41f Mon Sep 17 00:00:00 2001 From: Yi EungJun Date: Thu, 27 Nov 2014 17:18:12 +0900 Subject: [PATCH] Notification: Use system email address as notification sender Problem: Many Yobi users had extracted and filtered notification messages of Yobi from their mailbox by using MUA which supports groupping by the sender's email address. But if application.notification.bymail.hideaddress is false, it did not work because the sender's email address is the user's who causes the notification. Solution: Use system email address as the sender's email address of notification messages even if application.notification.bymail.hideaddress is false. --- app/models/NotificationMail.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/models/NotificationMail.java b/app/models/NotificationMail.java index 6fb2af536..fb033adf1 100644 --- a/app/models/NotificationMail.java +++ b/app/models/NotificationMail.java @@ -240,12 +240,8 @@ private static void sendNotification(NotificationEvent event) { final EventEmail email = new EventEmail(event); try { - if (hideAddress) { - email.setFrom(Config.getEmailFromSmtp(), event.getSender().name); - email.addTo(Config.getEmailFromSmtp(), utils.Config.getSiteName()); - } else { - email.setFrom(event.getSender().email, event.getSender().name); - } + email.setFrom(Config.getEmailFromSmtp(), event.getSender().name); + email.addTo(Config.getEmailFromSmtp(), utils.Config.getSiteName()); for (User receiver : usersByLang.get(langCode)) { if (hideAddress) {