Work with case-sensitive email addresses

Closes #4235
Merge pull request #4320 from felixrieseberg/iss4235

Work with case-sensitive email addresses