View Issue Details

IDProjectCategoryView StatusLast Update
0014543mantisbtemailpublic2014-02-07 18:24
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.12 
Target Version1.2.16Fixed in Version1.2.16 
Summary0014543: Emails are not sent to addresses with single subdomain
Description

This may cause silent failure of e-mail sending, which can be confusing especially when signing up for a new account.

Steps To Reproduce

$ php -a
Interactive shell

1. test using PHPMailer()

php > require("library/phpmailer/class.phpmailer.php");
php > $m=new phpmailer();
php > $m->addaddress("root@localhost.com");
php > if($m->IsError()) echo $m->ErrorInfo; else echo "OK";
OK
php > $m->addaddress("root@localhost");
php > if($m->IsError()) echo $m->ErrorInfo; else echo "OK";
Invalid address: root@localhost

2. minimal PHP test

php > var_export( filter_var( 'user@localhost', FILTER_VALIDATE_EMAIL ) );
false

Additional Information

Upstream bug reports

TagsNo tags attached.

Relationships

related to 0014453 closeddregad email validation regex does not accept addresses with single subdomain 
has duplicate 0012925 closeddregad Trying to debug problem sending email 
has duplicate 0012335 closeddregad PHPMailer 5.0 does not send email to local network addresses 
has duplicate 0010580 closeddregad Admin user creation gives output errors 
related to 0014631 closeddregad Email validation needs to be consistent 
related to 0012171 closeddregad User Create - user mail like : john.doe@partners.mydomain.com are not accepted 
child of 0015958 closeddregad Upgrade PHPMailer to 5.2.6 

Activities

dregad

dregad

2012-08-16 11:37

developer   ~0032589

Upstream issue is confirmed resolved in release 5.2.1 (latest); will perform tests and if successful will bundle the new version with MantisBT.

dregad

dregad

2012-08-16 13:00

developer   ~0032590

Last edited: 2012-08-16 13:15

Actually, further testing shows that the problem is not only still present in PHPMailer 5.2.1 contrary to what I wrote earlier (my test case was not sufficient), but in fact not a PHPMailer issue at all.

PHPMailer validates e-mail addresses using PHP filter_var() function with FILTER_VALIDATE_EMAIL, which considers single-subdomain addresses as invalid


php > var_export( filter_var( 'user@localhost', FILTER_VALIDATE_EMAIL ) );
false

After searching, I found this: https://bugs.php.net/bug.php?id=49576

Funny enough, grangeway reported the same problem 2 years ago - no progress since then.

dregad

dregad

2012-08-17 06:51

developer   ~0032603

Just noticed that atrol had already identified that PHP issue in 0012335.

Posted an update on the PHPMailer tracker

dregad

dregad

2013-06-01 08:50

developer   ~0037025

This was fixed in PHPMailer v5.2.2 [1]

[1] http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r=173

dregad

dregad

2013-06-01 09:02

developer   ~0037027

PHPMailer library upgraded to 5.2.6

Related Changesets

MantisBT: master-1.2.x 9f959b78

2013-06-01 01:34

dregad


Details Diff
Upgrade PHPMailer from 5.2.1 to 5.2.6

See changelog.md for details

Fixes 0014543, 0015953
Affected Issues
0014543, 0015953, 0015958
mod - library/README.libs Diff File
rm - library/phpmailer/README Diff
add - library/phpmailer/README.md Diff File
mod - library/phpmailer/class.phpmailer.php Diff File
mod - library/phpmailer/class.pop3.php Diff File
mod - library/phpmailer/class.smtp.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ar.php Diff File
mod - library/phpmailer/language/phpmailer.lang-br.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ca.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ch.php Diff File
mod - library/phpmailer/language/phpmailer.lang-cz.php Diff File
mod - library/phpmailer/language/phpmailer.lang-de.php Diff File
mod - library/phpmailer/language/phpmailer.lang-dk.php Diff File
add - library/phpmailer/language/phpmailer.lang-eo.php Diff File
mod - library/phpmailer/language/phpmailer.lang-es.php Diff File
mod - library/phpmailer/language/phpmailer.lang-et.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fi.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fo.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fr.php Diff File
add - library/phpmailer/language/phpmailer.lang-he.php Diff File
mod - library/phpmailer/language/phpmailer.lang-hu.php Diff File
mod - library/phpmailer/language/phpmailer.lang-it.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ja.php Diff File
mod - library/phpmailer/language/phpmailer.lang-nl.php Diff File
mod - library/phpmailer/language/phpmailer.lang-no.php Diff File
mod - library/phpmailer/language/phpmailer.lang-pl.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ro.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ru.php Diff File
mod - library/phpmailer/language/phpmailer.lang-se.php Diff File
add - library/phpmailer/language/phpmailer.lang-sk.php Diff File
mod - library/phpmailer/language/phpmailer.lang-tr.php Diff File
mod - library/phpmailer/language/phpmailer.lang-zh.php Diff File
mod - library/phpmailer/language/phpmailer.lang-zh_cn.php Diff File
mod - library/phpmailer/readme_mantis.txt Diff File

MantisBT: master f1a60e6d

2013-06-01 01:34

dregad


Details Diff
Upgrade PHPMailer from 5.2.1 to 5.2.6

See changelog.md for details

Fixes 0014543, 0015953
Affected Issues
0014543, 0015953, 0015958
mod - library/README.libs Diff File
rm - library/phpmailer/README Diff
add - library/phpmailer/README.md Diff File
mod - library/phpmailer/class.phpmailer.php Diff File
mod - library/phpmailer/class.pop3.php Diff File
mod - library/phpmailer/class.smtp.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ar.php Diff File
mod - library/phpmailer/language/phpmailer.lang-br.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ca.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ch.php Diff File
mod - library/phpmailer/language/phpmailer.lang-cz.php Diff File
mod - library/phpmailer/language/phpmailer.lang-de.php Diff File
mod - library/phpmailer/language/phpmailer.lang-dk.php Diff File
add - library/phpmailer/language/phpmailer.lang-eo.php Diff File
mod - library/phpmailer/language/phpmailer.lang-es.php Diff File
mod - library/phpmailer/language/phpmailer.lang-et.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fi.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fo.php Diff File
mod - library/phpmailer/language/phpmailer.lang-fr.php Diff File
add - library/phpmailer/language/phpmailer.lang-he.php Diff File
mod - library/phpmailer/language/phpmailer.lang-hu.php Diff File
mod - library/phpmailer/language/phpmailer.lang-it.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ja.php Diff File
mod - library/phpmailer/language/phpmailer.lang-nl.php Diff File
mod - library/phpmailer/language/phpmailer.lang-no.php Diff File
mod - library/phpmailer/language/phpmailer.lang-pl.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ro.php Diff File
mod - library/phpmailer/language/phpmailer.lang-ru.php Diff File
mod - library/phpmailer/language/phpmailer.lang-se.php Diff File
add - library/phpmailer/language/phpmailer.lang-sk.php Diff File
mod - library/phpmailer/language/phpmailer.lang-tr.php Diff File
mod - library/phpmailer/language/phpmailer.lang-zh.php Diff File
mod - library/phpmailer/language/phpmailer.lang-zh_cn.php Diff File
mod - library/phpmailer/readme_mantis.txt Diff File