GSF.Net.Smtp.Mail.ApplySecuritySettings C# (CSharp) Method

ApplySecuritySettings() private method

private ApplySecuritySettings ( ) : void
return void
        private void ApplySecuritySettings()
        {
            // If the SMTP client is null,
            // we cannot apply security settings
            if ((object)m_smtpClient == null)
                return;

            // Set the username and password used to authenticate to the SMTP server
            if (!string.IsNullOrEmpty(m_username) && (object)m_password != null)
                m_smtpClient.Credentials = new NetworkCredential(m_username, m_password);
            else
                m_smtpClient.Credentials = null;

            // Apply the flag to enable SSL
            m_smtpClient.EnableSsl = m_enableSSL;
        }