I recently helped a client debug some mail issues in an ASP.NET application. These issues can be particularly frustrating because there are many different points of failure ranging from users' mail client, spam filters, SMTP setup, and more. In this particular case, no errors occurred in the application- smtpClient.Send exited successfully. However mail was not being received. Somewhere between SmtpClient and the users' Outlook, the mail was disappearing! After trying several different settings, I finally wrote this quick mail test page:
This let me quickly test both the configured mail settings, and other settings. After a few tries, I discovered that the 'from' address being used was no longer valid (for reasons I still don't completely understand). A little configuration change, and the app worked fine!
To use, simply copy the code above into a file named MailTest.aspx in the problem app. Browse to it and it should display a form that lets you test the various mail settings. Depending on your app, this is much quicker than changing settings in web.config and running through your app over and over.