Setting multiple SMTP settings in web.config?

Posted by alphadogg on Stack Overflow See other posts from Stack Overflow or by alphadogg
Published on 2010-12-06T03:51:47Z Indexed on 2010/12/23 2:54 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

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/mailSettings approach, but as I understand it, that only allows one SMTP connection definition at a time, used by SmtpClient().

However, I need more of a connectionStrings-like approach, where I can pull a set of settings based on a key/name.

Any recommendations? I'm open to skipping the tradintional SmtpClient/mailSettings approach, and I think will have to...

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-config