send e-mail and check status

Dónal picture Dónal · Sep 29, 2008 · Viewed 9.9k times · Source

Using Java mail, I would like to send an e-mail and check the status. Possible statuses include:

  • Hard-bounce: No mail server found
  • Soft-bounce: Mail server found, but account not found
  • Success

Is it even possible to send an e-mail and get some feedback about the delivery attempt in the manner I've described above?

EDIT: A respondent suggested looking for a Java library that provides the same functionality as ListNanny. I've searched around, but haven't found anything. Any idea if such a library exists?

Cheers, Don

Answer

Paul Tomblin picture Paul Tomblin · Sep 29, 2008

You can't do this reliably or consistently. What happens if your local mail server passes it onto a corporate out-going mail server, and then it bounces when that server tries to pass it on? What happens if the mail server can't talk to the other mail server and then the message times out after 4 days?