Verify Email Address

JorgeJDE

JorgeJDE

Active Member
I think I know the answer to this, but I may be wrong...

Is there a way to verify the validity of email addresses in JDE?

I've got a request to create a process that "somehow" verifies that the Clients' email addresses are valid and, if not, then the program should flag these as invalid emails.

Thanks in advance.

Jorge

OW Xe SP23/AS400
 
Jorge,

You can take a look for any JavaScript function to do that, and adapt it for a C BSNF.

Something like this:

<font class="small">Code:</font><hr /><pre>
<SCRIPT LANGUAGE="JavaScript">
function ValidateEmail()
{
var obj = eval("document.forms[0].Email");
var txt = obj.value;
if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7)))
{
alert('Invalid Email Address');
obj.focus();
}
}
</script>
</pre><hr />
 
Jorge,

This could be done, fairly easy, by using the 'find a character in a string' function.

* Convert case to Upper (I believe email addresses are case insensitive)
* If there are any spaces - FAIL
* If there isn't an '@' sign - FAIL
* If there isn't a '.' after the '@' sign - Fail
* Find the last '.' and pull the remaining four characters (are there any domains that end in anything longer than four... exmple .info?) - then compare that value against a custom UDC Lookup (com, EDU, BIZ, CA, AU, US, INFO... it could be a BIG LIST....)

Maybe that would be a fun function for JDEResearch.Com to build and sell for a couple dollars?

Let me know if you need more ideas!

(db)
 
I should have specified that what I meant by "validity" was if the email address exists, is active and can receive messages after validating it for the syntax errors.

So far I've been able to check the syntax as the user types in the email address, by making sure that @ is used and a dot exists after it. An email address may be well spelled but still be a non existing email.

In any case, I'm thinking of using a third party software since I'll be creating a list of all the email addresses I have and importing it into this third party program that performs that type of validation.

In any case, I truly appreciate your help. Thanks.

Jorge
 
I looked into this several months ago. There are several tools available that can handle a mass import of email addresses and then perform a check. Just google it. But the tools are not perfect. It seems that there is no fool-proof way to check if the email is valid, by the nature of the internet, and how the individual mail servers are set to accept/reject such requests.
 
Back
Top