Can an email address contain international (non-english) characters?

后端 未结 7 1270
北恋
北恋 2020-12-05 02:01

If it\'s possible, should I accept such emails from users and what problems to expect when I will be sending mails to such addresses?

相关标签:
7条回答
  • 2020-12-05 02:27

    Update 2015: Use RFC 6532

    The experimental 5335 has been Obsoleted by: 6532 and
    this later has been set to "Category: Standards Track",
    making it the standard.

    The Section 3.2 (Syntax Extensions to RFC 5322) has updated most text fields to
    include (proper) UTF-8.

    The following rules extend the ABNF syntax defined in [RFC5322] and
    [RFC5234] in order to allow UTF-8 content.
    
    VCHAR   =/  UTF8-non-ascii
    ctext   =/  UTF8-non-ascii
    atext   =/  UTF8-non-ascii
    qtext   =/  UTF8-non-ascii
    text    =/  UTF8-non-ascii
                 ; note that this upgrades the body to UTF-8
    dtext   =/  UTF8-non-ascii
    
    The preceding changes mean that the following constructs now
    allow UTF-8:
       1.  Unstructured text, used in header fields like
           "Subject:" or "Content-description:".
       2.  Any construct that uses atoms, including but not limited
           to the local parts of addresses and Message-IDs. This
           includes addresses in the "for" clauses of "Received:"
           header fields.
       3.  Quoted strings.
       4.  Domains.
    
    Note that header field names are not on this list; these are still
    restricted to ASCII.
    

    Please note the explicit inclusion of Domains.
    And the explicit exclusion of header names.

    Also Note about NFKC:

    The UTF-8 NFKC normalization form SHOULD NOT be used because
    it may lose information that is needed to correctly spell
    some names in some unusual circumstances.
    

    And Section 3 start:

    Also note that messages in this format require the use of the
    SMTPUTF8 extension [RFC6531] to be transferred via SMTP.
    
    0 讨论(0)
提交回复
热议问题