asp.net - Getting error while sending mail? -


When I am sending mail in my web application, I am getting this ARO.

I'm receiving this error. Element can only appear once in this section. (C: \ insetpub \ vhosts \ example.com \ httpdocs \ web.config line 64)

  & lt; System.net & gt; & Lt; MailSettings & gt; & Lt; Smtp & gt; & Lt; Network host = "webmail.example.com" port = "25" user name = "info@example.com" password = "asdf" default credential = "false" /> & Lt; Network host = "webmail.yyy.com" port = "25" username = "info@yyy.com" password = "asdf12" default credentials = "wrong" /> & Lt; / Smtp & gt; & Lt; / MailSettings & gt; & Lt; /system.net>  

It seems that you have duplicated an element in your web.config file. If you have added something to the config to enable or enable your email, then perhaps you have added the same entry twice to the accident, or have repeated the entry that was already there, to change its value .

Maybe something like this:

app settings and gt; & Lt; Add key = "mailFromAddress" value = "me@thing.com" /> & Lt; Add key = "mailFromAddress" value = "me@thing.com" /> & Lt; / AppSettings & gt;

Comments