In my app I have to send email to recipient who has umlauts in domain name. Example: "test@äöü.test.com"
I'm using cfmail tag and I'm getting such error: "invalid definition for attribute to at tag mail" "Invalid E-Mail Address definition (test@äöü.test.com)"
Is there any way to send email to such recipients in coldfusion?
Nowadays, umlauts can be used for domain names since all current browsers automatically convert the umlauts to ae, oe and ue, depending on the country's language.
Issue: Oracle B2C Service does not currently support Email Address Internationalization in sending responses to addresses that contain non-ASCII characters, such as umlauts or accents, in the local part of an email address. The local part of the email address consists of the characters in front of @.
There is even a easier solution! Why not use Oracles built in class: http://download.oracle.com/javase/6/docs/api/java/net/IDN.html#toUnicode(java.lang.String)
Then you only have to do this (example shows from punycode to Unicode):
<cfset strUrl = "xn--land-poa.se" />
<!--- Create a Java URL. --->
<cfset jUrl = CreateObject( "java", "java.net.IDN" ).toUnicode(strUrl) />
<cfoutput>
#jUrl#
You don´t have to download anything!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With