In this article I will explain with an example, how to configure Email SMTP Settings in App.Config file in Windows Forms (WinForms) Application.
Email SMTP Settings in App.Config file
Following are the Mail Server settings added in the App.Config file.
The SMTP Mail settings are stored in the appSettings sub-section of the configuration section of the App.Config file.
        <add key="Host" value="" />
        <add key="Port" value="587" />
        <add key="EnableSsl" value="True" />
        <add key="UserName" value="" />
        <add key="Password" value="SenderGmailPassword" />
        <add key="DefaultCredentials" value="True" />
For more details on how to send Email, please refer following article.