I’m working on a Windows Forms (.NET 3.5) application that has a built-in exception handler to catch any (heaven forbid) exceptions that may arise. I’d like the exception handler to be able to prompt the user to click a Send Error Report button, which would then cause the app to send an email to my FogBugz email address.
What’s the best way to do this, and are there any ‘gotchas’ to watch out for?
You’ll want to use the SmtpClient class as outlined here.
There are no gotchas – sending email is about as easy as it gets.