Configuration config=WebConfigurationManager.OpenWebConfiguration(this.Request.ApplicationPath);
MailSettingsSectionGroup netSmtp = (MailSettingsSectionGroup)config.GetSectionGroup("system.net/mailSettings");
Response.Write("Mail主机名:"+netSmtp.Smtp.Network.Host);
Response.Write("<br/>Mail主机Port:"+netSmtp.Smtp.Network.Port);