Better check on the validity of emails

At this moment it was possible to enter emails like:
mailto:info@example.com. This was causing some issue in the frontend,
since those links became html mailto: links.

Fixes: #3516
Merge pull request #6072 from jvanbaarsen/fix-3516

Better check on the validity of emails