No, you can't do what you want on the client. If you want to validate
that the given domain has email "capability" you'll need to send a
request to your server side and then lookup if the domain as any MX
records configured for it. If so, you know at the very least that
someone's registered an email server for the domain.
On Nov 19, 11:25 pm, david_data_digga <[EMAIL PROTECTED]> wrote:
> Is there any way to access the class java.net.InetAddress--or
> something providing similar functionality--from the client side of a
> GWT app? I know that everything compiles to Javascript so I guess the
> question would be whether that imposes a constraint such that this is
> impossible.
>
> I'm trying to verify whether a given email address is valid when it is
> entered in on the client side by a user. Ideally I'd like to do
> something like the following to check if a given domain name is valid:
>
> InetAddress x;
>
> try {
> x = InetAddress.getByName("www.google.com");
> System.out.println("Success: got to google and the IP address is:
> "+x.getHostAddress());} catch (UnknownHostException e1) {
>
> System.out.println("Failure: didn't get to google, Unknown host
> exception");
>
> }
>
> But I'm not sure if anything like this can be done on the client
> side. Any ideas?
>
> Thanks!!
>
> David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---