Now that e-mail is an important way of communicating in the business world, many people have expanded their customer contact databases to include e-mail addresses.
Unfortunately, it's very difficult to ensure that an e-mail address was typed correctly. In an effort to curb unsolicited e-mail, many companies do not allow you to look up addresses online to see if they're valid.
Here's a service program that checks the basic syntax of an e-mail address. It makes sure that the syntax of the address is legal and uses DNS to verify the domain portion (the portion after the @ symbol) of the e-mail address.
In addition to the service program, a test program is included showing
how to call the service program. You can download the code here:
http://www.iseriesnetwork.com/noderesources/code/clubtechcode/ValidateEmail.zip
More information about the DNS resolver APIs can be found in the
Information Center:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/unix8b.htm