开发者

Network tags in web.config?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜