3

I need to change SMTP host value on web.config transform. Here is what I have:

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

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

I transform 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>
mellamokb
  • 56,094
  • 12
  • 110
  • 136
katit
  • 17,375
  • 35
  • 128
  • 256

1 Answers1

4
<system.net>
  <mailSettings>
    <smtp>
      <network xdt:Transform="Replace" host="192.168.1.9" userName="" password="" />
    </smtp>
  </mailSettings>
</system.net>
Shawn Miller
  • 7,082
  • 6
  • 46
  • 54