Send mail with VB.NET - and get notification if recipient couldn't be reached
October 1, 2007
This has been a hard case to crack for quite sometime now… And it’s really annoying since at first the task seems so simple. Bare with me for a short history:
Very often users of a system want to send emails through the application, or send things in the application (document etc.) via email.
That is no biggie, i’ll use SMTP-mail - you think… until they add the demand “and of course we need to know if the mail reach the delivery adress”. Often that last part doesn’t come up until the system is in production and the situation occurrs.
Now you have some real tricky questions to handle. SMTP is a fire and forget protocol. There is no waiting until the mail has reached the recipient. Until .NET 2.0 that was also the case for us programmers. And of course you don’t want to integrated with Outlook or whatever...