Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Notification: Use system email address as notification sender
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Yi EungJun committed Nov 27, 2014
1 parent 6aff39c commit bc73166
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/models/NotificationMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bc73166

Please sign in to comment.