Exemple #1
0
            internal void Populate(Settings settings)
            {
                var s = settings.Email;

                if (ToAddress.HasValue())
                {
                    s.ToAddress = ToAddress;
                }
                if (FromAddress.HasValue())
                {
                    s.FromAddress = FromAddress;
                }
                if (FromDisplayName.HasValue())
                {
                    s.FromDisplayName = FromDisplayName;
                }
                if (SMTPHost.HasValue())
                {
                    s.SMTPHost = SMTPHost;
                }
                if (SMTPPort.HasValue)
                {
                    s.SMTPPort = SMTPPort;
                }
                if (SMTPUserName.HasValue())
                {
                    s.SMTPUserName = SMTPUserName;
                }
                if (SMTPPassword.HasValue())
                {
                    s.SMTPPassword = SMTPPassword;
                }
                if (SMTPEnableSSL.HasValue)
                {
                    s.SMTPEnableSSL = SMTPEnableSSL.Value;
                }
                if (PreventDuplicates.HasValue)
                {
                    s.PreventDuplicates = PreventDuplicates.Value;
                }

                if (s.ToAddress.HasValue())
                {
                    EmailNotifier.Setup(s);
                }
            }