MantisBT

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014543mantisbtemailpublic2012-08-01 21:142012-08-17 06:51
Reporterdregad 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version1.2.12 
Target VersionFixed in Version 
Summary0014543: Emails are not sent to addresses with single subdomain
DescriptionThis 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 InformationUpstream bug reports
- http://code.google.com/a/apache-extras.org/p/phpmailer/issues/detail?id=85 [^]
- https://bugs.php.net/bug.php?id=49576 [^]
TagsNo tags attached.
Attached Files

- Relationships
related to 0014453closeddregad email validation regex does not accept addresses with single subdomain 
has duplicate 0012925closeddregad Trying to debug problem sending email 
has duplicate 0012335closeddregad PHPMailer 5.0 does not send email to local network addresses 
has duplicate 0010580closeddregad Admin user creation gives output errors 
related to 0014631closeddregad Email validation needs to be consistent 

-  Notes
User avatar (0032589)
dregad (developer)
2012-08-16 11:37

Upstream issue is confirmed resolved in release 5.2.1 (latest); will perform tests and if successful will bundle the new version with MantisBT.
User avatar (0032590)
dregad (developer)
2012-08-16 13:00
edited on: 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.

User avatar (0032603)
dregad (developer)
2012-08-17 06:51

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

Posted an update on the PHPMailer tracker

- Issue History
Date Modified Username Field Change
2012-08-01 21:14 dregad New Issue
2012-08-01 21:15 dregad Relationship added related to 0014453
2012-08-01 21:15 dregad Status new => confirmed
2012-08-16 11:37 dregad Note Added: 0032589
2012-08-16 11:37 dregad Target Version => 1.2.12
2012-08-16 11:37 dregad Assigned To => dregad
2012-08-16 11:37 dregad Status confirmed => assigned
2012-08-16 13:01 dregad Note Added: 0032590
2012-08-16 13:01 dregad Assigned To dregad =>
2012-08-16 13:01 dregad Status assigned => confirmed
2012-08-16 13:01 dregad Target Version 1.2.12 =>
2012-08-16 13:14 dregad Summary PHPmailer library does not accept addresses with single subdomain => Emails are not sent to addresses with single subdomain
2012-08-16 13:14 dregad Steps to Reproduce Updated View Revisions
2012-08-16 13:14 dregad Additional Information Updated View Revisions
2012-08-16 13:15 dregad Note Edited: 0032590 View Revisions
2012-08-17 05:40 dregad Issue cloned: 0014631
2012-08-17 05:40 dregad Relationship added related to 0014631
2012-08-17 06:20 dregad Relationship added has duplicate 0012925
2012-08-17 06:34 dregad Relationship added has duplicate 0012335
2012-08-17 06:35 dregad Relationship added has duplicate 0010580
2012-08-17 06:51 dregad Note Added: 0032603


MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.1152 seconds.
memory usage: 2,826 KB
Powered by Mantis Bugtracker