Jump to content

Emails and domains with special chars


Rik

Recommended Posts

Hi all, this is my first post on this great forum, and unfortunately I must start with a... freak ;) question.

 

As you know, Italy lacks money and the "intelligent" IT-Nic got the "great" idea to start selling domains with accented characters to improve their revenues. >:(

 

My first reaction was: "I don't care: if one is pretty idiot to buy that domains deserves all the issues involved!". I'm still thinking that way, but at least for the sake of knowledge, I wonder if there really is a way to send such an email.

 

I'm talking about stuff like this one:

[b]info@I?t?rn?ti?n?liz?ti?n.it[/b]

that in Italy is now a correct address!

 

I've tried with mb_send_mail()

with and without ""

with and without <>

with and without mb_encode_mimeheader()

Nothing to do! The last solution is able to send accented chars but its useless for the address because replying to the email show something like

=?UTF-8?B?ScOxdMOrcm7DonRpw7Ruw6BsaXrDpnRpw7huQHJpa3NvZnQuaXQ=?=

plus the domain get an added @<mailservername> after the real domain i tried to encode.

 

Have you got any idea?

 

Rik

Link to comment
Share on other sites

On the above post the utf-8 address has been twisted by the forum wich seems not able to show utf-8 strings. I've tried with encoding but no success.

Anyway, basically was info@internationalization.it with some italian, german, spanish, finnish, vowel chars.

 

Update: I also notice a very unpleasant, in some cases dangerous behaviour using such addresses: the server where I'm testing, cut off the accented characters from the domain leaving in place the ascii ones, so that the domain name actually CHANGE! So, it's a good idea finding the real solution (sending to UTF-8 address), or being sure to avoid the delivery toward such domains with a preg_match validation on the ascii chars.

 

 

 

 

Link to comment
Share on other sites

Maybe I found a solution, eventually: the punycode.

E.g. test@internationalization.it (with the accented vowels I can't write down in this forum),

is translated into: test@xn--itrntinliztin-vdb0a5exd8ewcye.it

 

I can't try it for real because I don't own a domain with accented chars, but using this technique in the FROM field of the email it seems to be working properly, in that, when I receive the email it shows the punicode correctly, even when I click "Reply". The ultimate test should be done sending an email to a real address.

 

Class to translate into punycode:

http://phlymail.com/en/downloads/idna-convert.html

 

Service online to translate to/from punicode just for test

http://www.charset.org/punycode.php

 

Link to comment
Share on other sites

I haven't yet implemented the full script with punycode translation because I was looking for alternative solutions, if any.

It's pretty freakish to receive emails such as info@xn--itrntinliztin-vdb0a5exd8ewcye.it and could be even more surreal in situations like this:

1) Contact Web form. A guy inserts his data and sends it.

2) The company receives the email and replies (if they don't know of punycode is quite alarming to see).

3) The guy of point 1, who inserted his email in plain utf-8, receives the reply at his address but with this strange, different one which is not what he digited in the web form.

 

Well, provided that he really receives that email (because I doubt antispam likes it too much), I guess he will be a little upset! :D

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.