May I point this mistake in your article and code:
1) The characters valid in the local part (username) of an email address are not limited to abcdefghijklmnopqrstuvwxyz_-. as you state in your article and accompaining code.
You should have a look at RFC 2821.
This seem a problem with the whole site though: during the signup process I came across more disregards for standards:
1) email addresses are NOT limited to 40 characters.
2) the local part of an email addresses is case sensitive. I tested this by entering a mixed case email address, it was delivered converted to the lowercase version. What if it had been a different user?