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

Provide the right flags to IDN methods for email addresses conversion #2563

Closed
j-bernard opened this issue Nov 18, 2021 · 2 comments
Closed

Comments

@j-bernard
Copy link
Contributor

PHP Mailer converts the email addresses domain to A-label as it does not implement SMTPUTF8 flag but this conversion is not fully IDNA2008 compliant.
The following flags should be provided to idn_to_ascii convertion: IDNA_DEFAULT | IDNA_USE_STD3_RULES | IDNA_CHECK_BIDI | IDNA_CHECK_CONTEXTJ | IDNA_NONTRANSITIONAL_TO_ASCII when using INTL_IDNA_VARIANT_UTS46 variant.
This line should be updated.
A test case would be to provide an email address with domain fußball.test that should be converted to xn--fuball-cta.test instead of fussball.test.

See Unicode IDNA compatibility processing

@Synchro
Copy link
Member

Synchro commented Nov 19, 2021

Thanks for the pointers. Any chance you could wrap that up into a PR with tests?

@j-bernard
Copy link
Contributor Author

Yes, let me come back to you when this is ready.

Synchro added a commit that referenced this issue Nov 19, 2021
Fix #2563: Provide the right flags to IDN methods for email addresses conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants