我需要在web.config转换上更改SMTP主机值。这就是我所拥有的:
<system.net>
<mailSettings>
<smtp from="some@sioem.com">
<network host="localhost" userName="" password=""/>
</smtp>
</mailSettings>
</system.net>
我应该如何将它放在web.release.config中,而不是localhost,它说192.168.1.9?
我像这样转换连接字符串,但不确定如何使用smtp
<connectionStrings>
<add name="CoreModelContext"
connectionString="metadata=&"" providerName="System.Data.EntityClient"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
答案 0 :(得分:4)
<system.net>
<mailSettings>
<smtp>
<network xdt:Transform="Replace" host="192.168.1.9" userName="" password="" />
</smtp>
</mailSettings>
</system.net>