/// <summary>
        /// Verifies the environment, called before the send process
        /// starts to verify that important settings and infrastructure
        /// is in place.
        /// </summary>
        /// <returns>An EnvironmentVerification object, holding all the verification tests that has been run</returns>
        public virtual EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            // Verify all the settings

            // Get the registered filter for working with recipients
            RecipientsUtility recipUtil = new RecipientsUtility();

            SmtpClient client = EPiMailEngine.GetConfiguredSmtpClient();

            // Need an smtp server specified
            if (string.IsNullOrEmpty(client.Host) == true)
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Smtp host setting in web.config. The aspnetEmail component requires a SMTP server to be specified.");
            }

            // Verify license file
            if (DoesLicenseFileExist() == false)
            {
                env.VerificationItems.Add(VerificationType.Error, "Can't find aspNetEmail License file: " + GetLocalLicenseFilePath());
            }

            return(env);
        }
Example #2
0
        /// <summary>
        /// Verifies the environment, called before the send process
        /// starts to verify that important settings and infrastructure
        /// is in place.
        /// </summary>
        /// <returns>An EnvironmentVerification object, holding all the verification tests that has been run</returns>
        public virtual EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            SmtpClient client = EPiMailEngine.GetConfiguredSmtpClient();

            // Need an smtp server specified
            if (string.IsNullOrEmpty(client.Host) && string.IsNullOrEmpty(client.PickupDirectoryLocation))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Smtp settings in web.config. You need to configure smtp network host or a pickup directory.");
            }

            return(env);
        }
        /// <summary>
        /// Verifies the environment, called before the send process
        /// starts to verify that important settings and infrastructure
        /// is in place.
        /// </summary>
        /// <returns>An EnvironmentVerification object, holding all the verification tests that has been run</returns>
        public virtual EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            MailgunSettings settings = GetSettings();

            if (string.IsNullOrEmpty(settings.ApiKey))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Mailgun.ApiKey setting in configuration.");
            }

            if (string.IsNullOrEmpty(settings.Domain))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Mailgun.Domain setting in configuration.");
            }

            return(env);
        }
        public EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            SendGridSettings settings = GetSettings();
            if (string.IsNullOrEmpty(settings.Username))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing username setting in SendGrid connection string.");
            }

            if (string.IsNullOrEmpty(settings.Password))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing password setting in SendGrid connection string.");
            }

            return env;
        }
        /// <summary>
        /// Verifies the environment, called before the send process 
        /// starts to verify that important settings and infrastructure
        /// is in place.
        /// </summary>
        /// <returns>An EnvironmentVerification object, holding all the verification tests that has been run</returns>
        public virtual EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            // Verify all the settings

            // Get the registered filter for working with recipients
            RecipientsUtility recipUtil = new RecipientsUtility();

            SmtpClient client = EPiMailEngine.GetConfiguredSmtpClient();

            // Need an smtp server specified
            if (string.IsNullOrEmpty(client.Host) == true)
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Smtp host setting in web.config. The aspnetEmail component requires a SMTP server to be specified.");
            }

            // Verify license file
            if (DoesLicenseFileExist() == false)
                env.VerificationItems.Add(VerificationType.Error, "Can't find aspNetEmail License file: " + GetLocalLicenseFilePath());

            return env;
        }
Example #6
0
        /// <summary>
        /// Verifies the environment, called before the send process 
        /// starts to verify that important settings and infrastructure
        /// is in place.
        /// </summary>
        /// <returns>An EnvironmentVerification object, holding all the verification tests that has been run</returns>
        public virtual EnvironmentVerification VerifyEnvironment()
        {
            EnvironmentVerification env = new EnvironmentVerification();

            MailgunSettings settings = GetSettings();
            if (string.IsNullOrEmpty(settings.ApiKey))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Mailgun.ApiKey setting in configuration.");
            }

            if (string.IsNullOrEmpty(settings.Domain))
            {
                env.VerificationItems.Add(VerificationType.Error, "Missing Mailgun.Domain setting in configuration.");
            }

            return env;
        }