Itโs not clear from the OP whether they use LDAP, but here is some information that solved this for me that I havenโt found anywhere, including Jenkins JIRA.
Next suggestion:
-Dhudson.tasks.MailSender.SEND_TO_UNKNOWN_USERS = true
as well as:
Allow sending to unregistered users
and:
Create a committer as a Jenkins user
didn't work for me. However, the first answer put me on a way to solve the problem. It turns out that when using LDAP, Jenkins actually maps to the git committer username. So if the message is git commit:
Committer: John Doe < John.Doe@company.com > 2019-05-27 19:12:00
Jenkins will take "John Doe", convert it to "john.doe" and try to match with LDAP. Now, if your LDAP username is "john.doe", you're fine, but in my case the company standard is "doejohn", which will lead to a scary message:
Not sending mail to unregistered user John.Doe@company.com
This message is misleading because it shows the correct email address instead of mentioning a fictitious (non-existent) username. The solution for me was to set the git username to "doejohn":
$ git config --global user.name "doejohn"
source share