Web.Config, add information from the build user's environment

4ePBu4oK

New Member
Let's say I have a .NET web application that several developers are working on. This application sends out emails when they are interacting with it. I want emails to go to the person who deployed the application. So in web config we have:\[code\] <appSettings> <add key="SendEmailsTo" value="http://stackoverflow.com/questions/12676319/@EnvironmentUserEmail"/> </appSettings>\[/code\]When they build and deploy the application, I want this to be replaced with the windows's users email address, so if John Smith deployes the application the web.config will contain.\[code\] <appSettings> <add key="SendEmailsTo" value="http://stackoverflow.com/questions/12676319/[email protected]"/> </appSettings>\[/code\]Any ideas how to pull this off?
 
Back
Top