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

Clarify support for UTF-8 characters in email addresses #11

Merged
merged 1 commit into from Aug 2, 2019

Conversation

@koppen
Copy link
Member

commented Aug 2, 2019

First of all, we already validate those as valid, so this is just a codification
of that expectation.

Second of all, it is a valid email address - at least according to RFC6532
https://tools.ietf.org/html/rfc6532. It still needs to be encoded properly
before actually being delivered. The Mail gem added support for this in v2.7.0:
mikel/mail#1103.

That said, actually finding services that support this is still hard (in 2019).
Neither Gmail nor Hotmail supports this for their own local accounts, but can
send to email addresses with non-US ASCII characters. Exim has added
experimental support, it seems (https://bugs.exim.org/show_bug.cgi?id=1516).

Firefox, Chrome, and Safari rejects email addresses with non-US ASCII characters
when validating email fields. Mailguns email validation API says the address is
invalid (or rather it gives "result": "unknown", ).

Regardless of the lack of widespread support we allow these addresses because
the guiding principle is:

Don't reject a valid email address realistically in use by a potential user.
Err on the side of accepting too much.

An email address with non-US ASCII characters can realistically be in use by a
potential user, even though the major international players doesn't support
that.

@koppen koppen requested a review from olepalm Aug 2, 2019

@coveralls

This comment has been minimized.

Copy link

commented Aug 2, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling ad1dd4e on umlaut into cc2da80 on master.

1 similar comment
@coveralls

This comment has been minimized.

Copy link

commented Aug 2, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling ad1dd4e on umlaut into cc2da80 on master.

@coveralls

This comment has been minimized.

Copy link

commented Aug 2, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling d92953e on umlaut into 88ef5e8 on master.

Clarify support for UTF-8 characters in email addresses
First of all, we already validate those as valid, so this is just a codification
of that expectation.

Second of all, it is a valid email address - at least according to RFC6532
<https://tools.ietf.org/html/rfc6532>. It still needs to be encoded properly
before actually being delivered. The Mail gem added support for this in v2.7.0:
mikel/mail#1103.

That said, actually finding services that support this is still hard (in 2019).
Neither Gmail nor Hotmail supports this for their own local accounts, but can
send to email addresses with non-US ASCII characters. Exim has added
experimental support, it seems (https://bugs.exim.org/show_bug.cgi?id=1516).

Firefox, Chrome, and Safari rejects email addresses with non-US ASCII characters
when validating email fields. Mailguns email validation API says the address is
invalid (or rather it gives `"result": "unknown", `).

Regardless of the lack of widespread support we allow these addresses because
the guiding principle is:

> Don't reject a valid email address realistically in use by a potential user.
> Err on the side of accepting too much.

An email address with non-US ASCII characters can realistically be in use by a
potential user, even though the major international players doesn't support
that.

@koppen koppen force-pushed the umlaut branch from ad1dd4e to d92953e Aug 2, 2019

@olepalm

olepalm approved these changes Aug 2, 2019

@koppen koppen merged commit 2247d15 into master Aug 2, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@koppen koppen deleted the umlaut branch Aug 2, 2019

@koppen koppen added this to the 2.0.0 milestone Aug 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.