Setting multiple SMTP settings in web.config?

前端 未结 8 1364
庸人自扰
庸人自扰 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:33

    It seems that you can initialize using different SMTP strings.

    SmtpClient client = new SmtpClient(server);

    http://msdn.microsoft.com/en-us/library/k0y6s613.aspx

    I hope that is what you are looking for.

提交回复
热议问题