Skip to content

Commit

Permalink
mail: Make generous setting of allowed sending mail domains
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Apr 3, 2017
1 parent a59fd0b commit 6e5ec65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/NotificationMail.java
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ private static void sendNotification(INotificationEvent event) {
}

receivers.remove(User.anonymous);
if(StringUtils.isNotEmpty(Application.ALLOWED_SENDING_MAIL_DOMAINS)) {
if(StringUtils.isNotBlank(Application.ALLOWED_SENDING_MAIL_DOMAINS)) {
receivers.removeAll(getUsersUsingNoAcceptableEmails(receivers));
}

Expand Down Expand Up @@ -433,7 +433,7 @@ private static String getDomainFromEmail(String email) {
private static Set<User> getUsersUsingNoAcceptableEmails(Set<User> users) {
List<String> acceptableDomains = new ArrayList<>();

if(StringUtils.isNotEmpty(Application.ALLOWED_SENDING_MAIL_DOMAINS)){
if(StringUtils.isNotBlank(Application.ALLOWED_SENDING_MAIL_DOMAINS)){
for(String domain: Application.ALLOWED_SENDING_MAIL_DOMAINS.split(",")){
acceptableDomains.add(StringUtils.defaultString(domain, "").trim());
}
Expand Down
Empty file.

0 comments on commit 6e5ec65

Please sign in to comment.