graziano, I believe what you're talking about has to be done at the server level, so I don't think a script would be adequate. You're dealing with different protocols.
When you're saying [email@example.com...] you're actually mixing protocols, which can't be done.
On the internet, there are different protocols, or addressing systems, that each have a different syntax, or vocabulary - like rules of grammar. It's the same as though you're talking about dogs and birds. Fur is dog protocol, and feathers is bird protocol. You can't mix the two.
http is hypertext transfer protocol, which is part of the vocabulary rules used for addressing web addresses - URLs to connect browsers and web servers.
@ is part of the email protocol, - smtp, which is simple mail transfer protocol, and pop (pop3) - which connects with email, rather than URLs.
Therefore you cannot mix http and @ in any kind of internet addressing.
With some web hosts, you can have [subdomain.domain.com...] set up free of cost, if it's included with your hosting. With other hosts, like the one I use, you have to pay a bit extra to have that set up, and it has to be done by the server administrators. In fact, they assign a unique IP (Internet Protocol) number to the subdomain. Then, the correct way of addressing it would be [subdomain.domain.com...] - no @ is included in the "grammar" rules for this.