protected static EmailHelperConfiguration GetConfig()
        {
            EmailHelperConfiguration config = EmailHelperConfiguration.config;

            if (config == null)
            {
                throw new ConfigurationErrorsException("You must specify an 'EmailHelper' section in your web.config file.");
            }
            else
            {
                return(config);
            }
        }
Example #2
0
        ////***************************************************************************
        //// Abstract Properties
        //// 
        //protected abstract string NoReplyEmailAddress { get; }
        //protected abstract string AdminAddresses { get; }
        //protected abstract string SupportAddresses { get; }
        //protected abstract string SupportAddressBCC { get; }
        //protected abstract string SiteUrl { get; }
        ////***************************************************************************
        //// Private Properties
        //// 
        //protected virtual bool WriteExceptionsToTextLog { get { return false; } }
        //protected virtual char[] AddressSplitCharacters { get { return new char[] { ';' }; } }
        #endregion

        #region Class Constructors
        //***************************************************************************
        // Class Constructors
        // 
        static EmailHelper()
        {
            _config = GetConfig();
        }
        ////***************************************************************************
        //// Abstract Properties
        ////
        //protected abstract string NoReplyEmailAddress { get; }
        //protected abstract string AdminAddresses { get; }
        //protected abstract string SupportAddresses { get; }
        //protected abstract string SupportAddressBCC { get; }
        //protected abstract string SiteUrl { get; }
        ////***************************************************************************
        //// Private Properties
        ////
        //protected virtual bool WriteExceptionsToTextLog { get { return false; } }
        //protected virtual char[] AddressSplitCharacters { get { return new char[] { ';' }; } }
        #endregion

        #region Class Constructors
        //***************************************************************************
        // Class Constructors
        //
        static EmailHelper()
        {
            _config = GetConfig();
        }