configuration - Web.config in asp.net? -


In my web application, I doubt I can put two nework tags in the smtp mailSetting tag. I was located on two network tags in SMTP, but I am receiving this error when I am sending mail. Element can only appear once in this section. (C: \ insetpub \ vhosts \ example.com \ httpdocs \ web.config line64) This is my web configuration code ......

   & Lt; Network host = "webmail.yyy.com" port = "25" user name = "info@yyy.com" password = "asdf254" default credential = "false" /> & Lt; / Smtp & gt; & Lt; / MailSettings & gt;  

You can use the AppSettings section and lots You can add configuration values ​​as you like, for example:

   & Lt; Add Key = "SMTP2" value = "smtpserver2" /> & Lt; Add Key = "SMTP3" value = "smtpserver3" /> & Lt; Add Key = "SMTP4" value = "smtpserver4" /> & Lt; / AppSettings & gt;  

And then in your code it decides which server to use.


Comments