Question

Ok, how can Javax.mail check if an email is existing? Let say I sent a message from a@cc.com to b@cc.com using Javax.mail. b@cc.com does not exist but Javax still saying that it sent the message OK. That is just like you email to a non-existent email in Yahoo mail or Gmail, even the destination email is non-exist, you still can be able to email it, & you only know that destination email does not exist after many hours when Gmail or Ymail returns a "failure recipient sending" or something like that.

Someone said that we can use MX record but they did not clearly how to use Javax to achive that. I doubt that solution.

Can you find a solution for it?

Was it helpful?

Solution

You will not be able to make sure that the address exists. Due to the distributed structure of the internet, the knowledge of whether an address exists is not available at one central point.

What you could do is check whether the domain to which the email is sent (cc.com in your example) exists and therefore if there's a chance of your email arriving. The idea of using the MX record is basically this; you can check which server would be responsible for the delivery of your email.

OTHER TIPS

Refer This Question and Oracle Article To solve your problem.

You can get detailed delivery report whether your email is sent or not to correct email id. There's exception, if wrong email id is entered and it is available it will to it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top