strip whitespace when changing e-mail addresses

Fixes #778.
Merge pull request #780 from jroes/fix-778

Strip whitespace when changing e-mail addresses