1

I am trying to send mails in large numbers, say 1000, using a java test application and a mail server, but though the application confirms that it has sent all the 1000 mails without any exceptions, I am not receiving the exact number (1000) of the same in the in box of the recipient's mail box(all the mails are sent to the same email recipient for testing the application's reliability). That is few of them goes missing each time I execute the application. Is there any means for the java application to verify whether each mail that is being sent using the mail server has reached the destination? And why do they go missing in the first place? It would be of great help if some one could provide tips/suggestions on how to tackle this.

Thank you, Good day

user68145
  • 11
  • 2
  • Is that some internal testing? Or are you sending them over the internet to some "random remote" ? Did you check the logs of your smtp server? And the mailbox of the sending user? – Heiko Rupp Feb 01 '11 at 09:53

2 Answers2

1

No, you can't (I think). You can verify if the email was correctly delivered to your SMTP server, but the message will probably go through a few other smtp servers too, and one of them can mark your message as spam without you ever knowing about it.

I think the best way to make sure that an internet mail gets delivered, is to make sure your message does not get tagged as spam. There a few simple ways to do this:

  • Implement DomainKeys or SPF (Sender Policy Framework). You'll need your sys-admins assistance with this.
  • Don't put too much html in the email

Still, there is always a chance your mail with not get trough. That's the nature of Internet email.

Jeroen Jacobs
  • 1,386
  • 3
  • 16
  • 25
0

You application only delivers the mails to your SMTP server which then propagates them further (as Jeroen just said). So you cannot "see" if the mail has actually been delivered or been dropped as Spam somewhere on the way.

For a delivery notification you may take a look at the "Disposition-Notification-To" header in RFC2298 (see section 2.1), but I guess this will not actually help determining successful delivery inside your Java application., unless you access the confirmation mailbox from there.

Axel Knauf
  • 1,600
  • 1
  • 10
  • 12
  • Thank you Jeroen and Axel for your time. I tried it in a test domain which had a mail server set up and the test domain was not connected to the net. And still there were mails missing. – user68145 Jan 25 '11 at 12:57