User173749404 posted
hi, who can tell me how to configure the app.config file in vb.net, especially when I want to set up the smtpmail.smtpserver via it? thanks a lot
User-1174460629 posted
You could add a section called <appSettings> and then in your code you could import the System.Configuration namespace. Once that is done, you could create a key for your Smtp server: <add key="SmtpServer" value="localhost" /> and access it though code as such:
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("SmtpServer")