MantisBT: master-1.2.x 6987b4ad

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2012-08-16 22:41 master-1.2.x 4ff0a958
Affected Issues  0014631: Email validation needs to be consistent
Changeset

Fix 0014631: Consistent email validation

PHPMailer uses filter_var() to check for an e-mail validity; this
function treats single-domain e-mail addresses (e.g. user@localhost) as
invalid. However, Mantis API function email_is_valid() relies on a
custom regex to validate e-mails, which does accept such addresses. As a
consequence, we accept addresses to which we are unable to send
messages.

To avoid this problem, we now rely on PHPMailer::ValidateAddress()
method to ensure that any email we store can be sent PHPMailer.

mod - core/email_api.php Diff File