开发者

Network tags in web.config?

开发者 https://www.devze.com 2023-01-08 09:28 出处:网络
i hae a doubt in my web application i place two network tags in smtp like this... <system.net> <mailSettings>

i hae a doubt in my web application i place two network tags in smtp like this...

  <system.net>
      <mailSettings>
        <smtp>
          <network host="webmail.example.com" por开发者_如何转开发t="25" userName="info@example.com" password="asdf"  defaultCredentials="false"/>
          <network host="webmail.yyy.com" port="25" userName="info@yy.com" password="asdf12"  defaultCredentials="false"/>
        </smtp>
      </mailSettings>
    </system.net>


You can only have one SMTP Server in that section. If you need to use two then you should probably store the information in the appsettings section of the web.config and set the appropriate values when you create the SMTPClient.

0

精彩评论

暂无评论...
验证码 换一张
取 消