Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert of "Use PHP's own email validation routines"

This partially reverts commit 4235a08
which introduced a regression.

The PHP email validation rejects valid e-mail addresses with the form
user@hostname [1]. The PHPMailer accepts these, and furthermore it makes
sense to rely on the validation routine provided by the library we use
to send our emails.

[1] https://bugs.php.net/bug.php?id=49576
  • Loading branch information...
commit 50d235ad101f61a6c6888316e827fd225ad4b9cd 1 parent 86d30ed
@dregad dregad authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/email_api.php
View
6 core/email_api.php
@@ -122,9 +122,9 @@ function email_is_valid( $p_email ) {
return true;
}
- // check email address is a valid format
- $t_email = filter_var($p_email, FILTER_SANITIZE_EMAIL);
- if (filter_var($t_email, FILTER_VALIDATE_EMAIL)) {
+ # check email address is a valid format
+ $t_email = filter_var( $p_email, FILTER_SANITIZE_EMAIL );
+ if( PHPMailer::ValidateAddress( $t_email ) ) {
$t_domain = end( explode( '@', $t_email ) );
# see if we're limited to a set of known domains
Please sign in to comment.
Something went wrong with that request. Please try again.