예제 #1
0
        /// <summary>Return e-mail used for From addresses.</summary>
        public static string GetFromEmail(FromEmailType type)
        {
            var settingsKey = "FromEmail_" + type;

            var fromEmail = GetConfigSettingStr(settingsKey);

            if (String.IsNullOrWhiteSpace(fromEmail))
            {
                throw new Exception("EnvironmentUtils::" + settingsKey + " Not specified in config file.");
            }

            return(fromEmail);
        }
        /// <summary>Return e-mail used for From addresses.</summary>
        public static string GetFromEmail(FromEmailType type)
        {
            var settingsKey = "FromEmail_" + type;

            var fromEmail = GetConfigSettingStr(settingsKey);
            if (String.IsNullOrWhiteSpace(fromEmail))
            {
                throw new Exception("EnvironmentUtils::" + settingsKey + " Not specified in config file.");
            }

            return fromEmail;
        }