예제 #1
0
        private void UpdateSmtpServerNumber(string smtpServer)
        {
            var smtp = new SMTP();

            if (string.IsNullOrWhiteSpace(_originalSmtpServer))
            {
                _originalSmtpServer = smtp.Server;
            }

            if (smtp.Server != smtpServer)
            {
                smtp.AttributeValues["Server"].Value = smtpServer;

                smtp.SaveAttributeValues();
            }
        }
예제 #2
0
        private void UpdateSmtpPortNumber(string smtpPort)
        {
            var smtp = new SMTP();

            if (string.IsNullOrWhiteSpace(_originalSmtpPort))
            {
                _originalSmtpPort = smtp.Port.ToString();
            }

            if (smtp.Port.ToString() != smtpPort)
            {
                smtp.AttributeValues["Port"].Value = smtpPort;

                smtp.SaveAttributeValues();
            }
        }