Setting multiple SMTP settings in web.config?

前端 未结 8 1355
庸人自扰
庸人自扰 2020-12-01 00:42

I am building an app that needs to dynamically/programatically know of and use different SMTP settings when sending email.

I\'m used to using the system.net/mailSet

8条回答
  •  再見小時候
    2020-12-01 01:24

    I ended up building my own custom configuration loader that gets used in an EmailService class. Configuration data can be stored in web.config much like connection strings, and pulled by name dynamically.

提交回复
热议问题