Jenkins email plugin doesn't send email to user who broke the build

Viewed 16420

I've setup Jenkins to send emails only to users who broke the build using email-ext plugin, but I'm getting this error:

Not sending mail to unregistered user user@example.com because your SCM claimed this was associated with a user ID ‘John Smith' which your security realm does not recognize; you may need changes in your SCM plugin

I don't really understand what this error means, is the problem in our SCM, or in the email plugin? The emails are taken from the commit history, should I register them somewhere so Jenkins will start working?

For reference, this is the code around the error message in the plugin's source code:

                    } catch (UsernameNotFoundException x) {
                        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 because your SCM"
                    ........

How do I enable SEND_TO_UNKNOWN_USERS?

The error message is also mentioned in this bug report.

4 Answers

Given jenkins takes the first part of the email address and creates a user, I made my team have their jenkins user name be the first part of their email address. This removed any overhead of having to maintain two separate users.

Related