Visual Studio provides a number of ways to do this, and which method you want to use depends on what exactly you want to do.
For example, you can use build targets to specify which type of build you want, Release and Debug are common, but you can also create others. You can then add #if pre-processor statements in your code to do things depending on which build is selected.
Another method, which sounds like what you want, is to use App Settings in your app or web.config. Then use the build transforms to transform your config based on the type of build (you will see a Web.Debug.config or Web.Release.config for instance. When you publish your site, Visual Studio will automatically apply these tranforms to your config files and change the app settings to whatever you want for that build type.
So, using your example, you would have this in your Web.config:
<appSettings>
<add key="notifyAddress" value="debug@foo.com" />
</appSettings>
Then, in your Web.Release.config you have this transform:
<appSettings>
<add key="notifyAddress" value="release@foo.com"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</appSettings>
In your code you have:
string emailAddress = ConfigurationManager.AppSettings["notifyAddress"];
Now, when you publish your site, emailAddress will automatically have release@foo.com.