Using the Drupal core function valid_email_address($mail) doesn't cover all possible e-mail address syntax errors.
This function doesn't take the Top Level Domain in count. The explanation from the Drupal core developers is that they want to make e-mail addresses on a domain without a TLD, like root@localhost, valid.
So beware of this! This is spread all over the Drupal system. Even while registering on a Drupal website, you don't have to specify the TLD. So I think a lot of people will make the typo and register with an address like johndoe@hotmailcom and they will never receive their confirmation e-mail.
Comments
drupal unable to send email with to-level domain with country code like .com.ph
For future reference there actually is a patch ready for Drupal 6 that fixes some more cases. The behavior will be:
admin@localhost - valid
admin@elsewhere - valid
admin@localhost.com - valid
admin@localhost. - invalid
admin@ - invalid
Post new comment