I have a WebAPI project containing services to my project, and an integration project that handles things such as sending emails.
I have originally had my mail settings in the web.config of the API project and instantiating the SmtpClient quite happily and sending emails with no problem.
Having refactored and moved the mail sending to the integration project, including moving the mail settings to the app.config of the integration project, I now find that my app can't locate the mail settings in the app.config.
I could always move the mail settings into the web.config of the calling project but it seems to me that the settings and the code actually doing the sending should live in the same project.
Is there a way to have the code in the integration project pick up the settings from the app.config of the integration project rather than the web.config of the calling project?