| About two months ago, when I was writing this big web-application, I came into the
situation where the application had to send weekly statistic reports to the
registered users.
Because I wanted to safe bandwith and because I thought that the statistics are really
interesting for the users, I wanted to achieve the following two goals:
- The application should not more than two times try to send an email to an
invalid Email-Adress.
- The users with invalid adresses should be warned in their preferences-screen
to allow them to either turn of the delivery or to correct their addresses.
As you may know, it is nearly impossible to validate every possible email-address on
registration: Also if you check the username-part at the MX-Host of the domain, you
never can be sure that the address really exists. And: I did not want to slow down the
users registration process by checking her address (and think about it: what if the
MX of the user was not available when she tried to register? Should I block her?).
This led me to the idea not to detect false adresses until the mail is really sent
to the user.
This article will show you, how to do this. First, I will explain the theoretical
principles, then I will go into the details and explain my own implementation. If you
don't like PHP or Exim, you will have to stick with the theoretical explanations, but
they should be accurate enough to do this task in your own environment.
|