Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 1 '11 at 9:53

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.