I\'ve dug around SO for an answer to this, and the best one I can find so far is here, however that is geared toward instances with static constructors; I\'m only using the
The other two answers are good answers to your direct question - here's a metaanswer - you should be throwing the exception in the method when you detect that the configuration elements are not populated, rather than in the constructor. IMHO, "not configured" is a valid configuration state for those elements at the constructor phase, just not at SendMail time. That will sidestep this whole problem.