Skip to content

Commit

Permalink
JENKINS-43268 make message clearer
Browse files Browse the repository at this point in the history
todo unit test
  • Loading branch information
davidvanlaatum committed Jun 23, 2017
1 parent d341c44 commit 6d4cbac
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -36,7 +36,11 @@
import hudson.plugins.emailext.ExtendedEmailPublisherContext;
import hudson.scm.ChangeLogSet;
import hudson.tasks.MailSender;
import jenkins.model.Jenkins;
import org.acegisecurity.Authentication;
import org.acegisecurity.userdetails.UsernameNotFoundException;

import javax.annotation.CheckForNull;
import javax.mail.internet.InternetAddress;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
Expand All @@ -46,10 +50,6 @@
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
import jenkins.model.Jenkins;
import org.acegisecurity.Authentication;
import org.acegisecurity.userdetails.UsernameNotFoundException;

public final class RecipientProviderUtilities {
private static final Logger LOGGER = Logger.getLogger(RecipientProviderUtilities.class.getName());
Expand Down Expand Up @@ -199,7 +199,10 @@ private static void addUsers(final Set<User> users, final TaskListener listener,
if (SEND_TO_UNKNOWN_USERS) {
listener.getLogger().printf("Warning: %s is not a recognized user, but sending mail anyway%n", userAddress);
} else {
listener.getLogger().printf("Not sending mail to unregistered user %s%n", userAddress);
listener.getLogger().printf("Not sending mail to unregistered user %s because your SCM"
+ " claimed this was associated with a user ID ‘%s’ which your security realm"
+ " does not recognize; you may need changes in your SCM plugin%n", userAddress,
user.getId());
continue;
}
}
Expand Down

0 comments on commit 6d4cbac

Please sign in to comment.