internal ConfigurationSmtpData Convert(SmtpConfiguration source) { ConfigurationSmtpData result = new ConfigurationSmtpData(); if (source != null) { result.Host = source.SmtpHost; result.Password = null; result.Port = source.SmtpPort; result.Username = source.SmtpUsername; } return(result); }
internal SmtpConfiguration CreateSmtpConfiguration(ConfigurationSmtpData source, SmtpConfiguration original) { SmtpConfiguration result = new SmtpConfiguration(); result.SmtpHost = source.Host; if (source.Password != null) { result.SmtpPasswordCipher = Common.Cryptography.EncryptionSupport.Instance.Encrypt(source.Password); } else { result.SmtpPasswordCipher = original?.SmtpPasswordCipher; } result.SmtpPort = source.Port; result.SmtpUsername = source.Username; result.SystemEmailSender = original?.SystemEmailSender; return(result); }