Hi Spam,
 
Yeah, you're going to have a problem determining if email addresses are actually valid, but outside of the JavaMail API you could do DNS queries, one to see if the recipient domain exists, and then to see if there is a registered mail exchanger for the domain. If either fails, drop the mail.
 
Doing validity checks based on domains greatly increases the feasibility of checking the validity of email addresses if you archive results per domain with a time to live factor, that way you dont have to validate each and every email address assuming each address is not at a unique domain name.
 
The other problem you are going to have especially if you are sending out 1000's of mails every day is the IP addresses for your JavaMail program. If these IP addresses are not listed as mail exchangers in the dns record for your domain you will find that a lot (and ever increasing number) of mail exchangers on the internet will reject your mail. So get your JavaMail ip's into your MX record. However, if you're sending out 1000's of mails every day, then in all probability you are sending out UCE, and you will probably have to change IP's regularly, as many mail exchangers will decide not to accept mail from you anyway once your IP is associated with UCE.
 
If by some chance your client is ASP'ing a UCE service, then you should track message bounces so that those addresses can be removed from the lists of 1000's of addresses.
 
Before the flame war starts, I hope I havent offended / misinterpreted you or your clients motives. Either way, the technical content is equally valid and points you in exactly the right way to go about your problem. Sample code.... I'm sure we can exchange some in return for a commercial agreement, contact me offlist if interested.
 
In terms of EJB-Interest, your mailings are a little OT, http://forums.devshed.com/forumdisplay.php?forumid=36 might be more appropriate in light of my take on your problem and route to sucess, but thats just the first hit I got from google, so digging a little deeper there might turn up somthing more useful.
 
HTH,
 
 -Enda.
 
----- Original Message -----
From: ssmtech
Sent: Friday, October 11, 2002 1:15 PM
Subject: Validating Email Address

Hello All,
          I am using JavaMail API to send thousands of emails every day through my application running on J2EE application server...
But what i really want to do is, how do i check whether a particular Email Address is Valid or not,if not valid then catch a exception and report it....
Also i meant by Valid email address as to be exsisting on that mail server..e.g "[EMAIL PROTECTED]" .i.e.the user "javamail" should exist on that domain "sun.com"...
 
Is there any way which i can do the above thing?
Also,since i will be sending 1000's of emails every day will it be feasible for me to check each and every email whether it exist or not and then send it.....how much time will it take to do the same...
 

Please help me out with this,can anybody give me a Detail desciption and Code of how can i do it...
 
Any suggestions are greatly appreciated
 
Thanks a million is advance
 
Sam

Reply via email to