How to convert this part of webconfig to my web.config.release?

I need to change the SMTP host value to web.config conversion. Here is what I have:

<system.net>
    <mailSettings>
      <smtp from="some@sioem.com">
        <network host="localhost" userName="" password=""/>
      </smtp>
    </mailSettings>
  </system.net>

How can I put it in web.release.config, so instead of localhost it says 192.168.1.9?

I will convert the connection string like this, but not sure how to do it with smtp

<connectionStrings>
  <add name="CoreModelContext"
    connectionString="metadata=&&quot;" providerName="System.Data.EntityClient"
    xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
+3
source share
1 answer
<system.net>
  <mailSettings>
    <smtp>
      <network xdt:Transform="Replace" host="192.168.1.9" userName="" password="" />
    </smtp>
  </mailSettings>
</system.net>
+4
source

All Articles