Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email syntax not accepted #16720

Closed
kkretsch opened this issue Jun 3, 2015 · 15 comments
Closed

email syntax not accepted #16720

kkretsch opened this issue Jun 3, 2015 · 15 comments
Assignees
Labels

Comments

@kkretsch
Copy link

kkretsch commented Jun 3, 2015

Logged in as admin I can neither send share links to that email address nor use that address as a test recipient within the admin e-mail-server section.

It seems within the file /var/www/cloud803/3rdparty/phpmailer/phpmailer/class.phpmailer.php I run into the pcre8 switch where it verifies the email with a fals result. I added some error_log lines before and after, using kai(at)kaikretschmann.de as email doesn't work there. (Replace the "at" as usual).

And I can't debug that pattern manually.

PHP 5.6.9-1~dotdeb+7.1
apache 2.2.22
debian wheezy/7.8
OwnCloud 8.0.3

@ghost
Copy link

ghost commented Jun 3, 2015

Just posting some additional loglines from your post at #16715 (comment)

preg_match(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 728 at /var/www/cloud803/3rdparty/phpmailer/phpmailer/class.phpmailer.php#893

@DeepDiver1975 DeepDiver1975 added this to the 8.0.5-next-maintenance milestone Jun 3, 2015
@DeepDiver1975
Copy link
Member

@kkretsch can I ask you to report this issue with the upstream project? https://github.com/PHPMailer/PHPMailer/issues Thanks a lot!

@kkretsch
Copy link
Author

kkretsch commented Jun 3, 2015

As it seems here PHPMailer/PHPMailer#429 it might be a central php problem. php 5.6.8 did work and the newer ones fail. Might be some bigger issue for other web projects too.

@DeepDiver1975
Copy link
Member

We might want to apply this workaround - PHPMailer/PHPMailer#429 (comment)

@DeepDiver1975
Copy link
Member

THX @kkretsch for searching the upstream project!

@kkretsch
Copy link
Author

kkretsch commented Jun 8, 2015

I tried the one line patch but I still have the same problem. It first runs into the default/php switch case for mail address validation but after that enters the same pcre8 validation switch. It might get called on a second place still sithout the 'php' second argument.

@DeepDiver1975
Copy link
Member

🤦

@kkretsch
Copy link
Author

kkretsch commented Jun 8, 2015

As I suspected: the foreign phpmailer class revalidates the receipient and sender email addresses within its own clas without any second argument defaulting to "auto" again. If I override that auto default it works for me.

@Synchro
Copy link

Synchro commented Jun 8, 2015

If it's calling the original validateAddress implementation instead of the one in your subclass, that's a side-effect of it using self::validateAddress() internally. That would be fixed properly if it used static::validateAddress() instead to have it select the correct class. Unfortunately we can't do that by default because late static binding was only introduced in PHP 5.3.

So far I think this bug is specific to PHP 5.5.25 and 5.6.9 when run through apache mod_php; when I know that for sure (probably when we see the next PHP release fix it), I'll patch around it so you don't have to deal with this silliness.

@DeepDiver1975
Copy link
Member

I'll patch around it so you don't have to deal with this silliness.

@Synchro Thanks a lot! This is incredible! Many thanks!

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.0.6-next-maintenance, 8.0.5-current-maintenance Jun 16, 2015
@DeepDiver1975
Copy link
Member

postponed to 8.0.6 - we are waiting for the upstream fix

@Synchro
Copy link

Synchro commented Jun 16, 2015

PHP 5.6.10 and 5.5.26 have been released and both include a new version of the PCRE lib (8.37) - can you confirm that this release doesn't suffer from this problem? The problem I have is that I can't reproduce it.

@DeepDiver1975
Copy link
Member

@kkretsch can you retry with an updated php? THX

@kkretsch
Copy link
Author

I just tried once more and now it works. I can send that test eMail from within the admin menu using the php transport.
Current php version was: PHP 5.6.10-1~dotdeb+7.3 (cli) (built: Jun 15 2015 07:22:09)

@DeepDiver1975
Copy link
Member

Thanks a lot @kkretsch - closing this issue then

@MorrisJobke MorrisJobke removed this from the 8.0.6-next-maintenance milestone Jun 17, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants