Saturday, 14 July 2012

Reading MailSetting from web.config


System.Configuration.
System.Net.Configuration.

{
}
Configuration mailConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);MailSettingsSectionGroup mailSettings = (System.Net.Configuration.MailSettingsSectionGroup)mailConfig.GetSectionGroup("system.net/mailSettings");if (mailSettings != default(MailSettingsSectionGroup))

Google+ Followers