Is it possible to send email to an address containing Unicode latin characters using cfmail?

We need to be able to send an email from cfmail to an email address containing Latin a with a sharp. I assume that we will eventually have to allow other Unicode characters - the approximate email address foobá r@example.com . ColdFusion throws an error at this email address, which is technically sound. Since the sharp a is a UTF-8 character, and the default encoding for cfmail is UTF-8, I'm not sure what other parameters I need to enable this work. Is it possible?

The error I get is the attribute validation error for the CFMAIL tag.

Details: the value of the attribute currently holding foobá r@example.com is not valid.

+6
source share
1 answer

I am not an expert on I18N or email, but my understanding of FWIW is that current systems usually do not support Unicode in the local part of the email address, that is, the mailbox name is up to @. Local mail servers can support it and resolve an internal name, for example foobár, but if this person wants to receive mail from the outside world, they will also need an ASCII alias, such as foobar.

There is, however, a Unicode support mechanism in the address domain section, which includes conversion to an ASCII representation called punycode. This means that an address such as foo@foob ár.com will be converted to foo@xn--foobr-0qa.com , which will accept the current DNS and mail systems.

This can be done in ColdFusion using existing Java libraries. See this question for more details.

+4
source

Source: https://habr.com/ru/post/902129/


All Articles