Setting multiple SMTP settings in web.config?

I needed to have different smtp configurations in the web.config depending on the environment: dev, staging and production. Here’s what I ended up using: In web.config: <configuration> <configSections> <sectionGroup name=”mailSettings”> <section name=”smtp_1″ type=”System.Net.Configuration.SmtpSection”/> <section name=”smtp_2″ type=”System.Net.Configuration.SmtpSection”/> <section name=”smtp_3″ type=”System.Net.Configuration.SmtpSection”/> </sectionGroup> </configSections> <mailSettings> <smtp_1 deliveryMethod=”Network” from=”mail1@temp.uri”> <network host=”…” defaultCredentials=”false”/> </smtp_1> <smtp_2 deliveryMethod=”Network” from=”mail2@temp.uri”> <network host=”1…” defaultCredentials=”false”/> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)