thisismynewname / isemail

Automatically exported from code.google.com/p/isemail
0 stars 0 forks source link

Value throws an exception when running IsEMail.is_email_verbose(email, true) #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The problem is that the jndi.properties that coldfusion uses on startup 
includes the following:

java.naming.provider.url=localhost:2932

and that value throws an exception when running IsEMail.is_email_verbose(email, 
true)

javax.naming.ConfigurationException: localhost:2932 is not a valid DNS 
pseudo-URL

I tried changing it to various but anything else causes the coldfusion server 
to fail to start.

However in my code, if I set the: 
sys.setProperty("java.naming.provider.url","dns::2932") via sys = 
createObject(“java”,”java.lang.System”), the call to IsEMail works.  I 
don’t know what effect changing the naming provider in the coldfusion env 
scope will have on the system so I am not comfortable with it.

So, looking at your code carefully I can across the dnsLookup.java and through 
other research via 
http://download.oracle.com/javase/1,5.0/docs/guide/jndi/jndi-dns.html

I see you can set the env.put(Context.PROVIDER_URL, dnsserver); which could be 
used in the doLookup function.

So is it possible to have an new function in the dnsLookup class that sets a 
custom dns server ( ie: dns::2932 which works for me ) that the doLookup 
function can utilize?

Does that make any sense lol…I am trying to explain it the best I can.

So, short story is that it would be nice to pass a custom PROVIDER_URL when we 
init() isEmail.

Thanks for your time!

John Skrotzki

Original issue reported on code.google.com by dominic....@gmail.com on 7 Jun 2011 at 7:51

GoogleCodeExporter commented 8 years ago
Using ColdFusion 9.0.1 (JRUN), I was also getting a 
"javax.naming.ServiceUnavailableException: DNS server failure [response code 
2]; remaining name 'mailDomain.com" error when there wasn't any DNS record. I 
had to add try/catch around it to prevent it from throwing an error.

Original comment by youthpas...@gmail.com on 20 Aug 2014 at 9:00