I have noticed that when using DevelopersRecipientProvider in the declarative pipeline, the information returned is the userid and not the valid email address. I get the error:
Error sending to the following INVALID addresses: firstname.lastname@example.org
abc543 is the user that committed a change. The real email address is email@example.com. firstname.lastname@example.org does not work.
I turned on a log appender and this is the information I get
I called code similar to ActiveDirectoryAuthenticationProvider and noticed that IADsUser.emailAddress() returns the valid email address so it would appear that the problem is in ActiveDirectoryUserDetail.updteUserInfo(). I say that because later the ActiveDirectoryMailAddressResolverImpl returns a null email address and I presume this is the case because it was not save correctly in ActiveDirectoryUserDetail.updteUserInfo().