public static string GetEmailCounters()
        {
            String Result = String.Empty;
            YandexEmailCountersResponse EmailCounters = YandexManager.GetUnreadEmailCount(AppSettingsValues.GetDomainActiveUserEmailCreation, "*****@*****.**");

            if (EmailCounters != null)
            {
                Result = JsonConvert.SerializeObject(EmailCounters.counters, Formatting.Indented);
            }
            return(Result);
        }
        public static YandexEmailCountersResponse GetUnreadEmailCount(string strDomain, string strEmailId)
        {
            string AoutCode = "e5a3d8edd42d424e83b0cf9d62a09a0f";
            string strURL   = "https://pddimp.yandex.ru/api2/admin/email/counters?Authorization=" + AoutCode + "&domain=" + strDomain + "&login="******"";

            response = HttpGet(strURL);

            if (response.IndexOf("new") > -1)
            {
                response = response.Replace("new", "newone");
            }
            YandexEmailCountersResponse EmailCounters = JsonConvert.DeserializeObject <YandexEmailCountersResponse>(response);

            return(EmailCounters);
        }
Exemple #3
0
        public static string GetEmailCounters()
        {
            YandexEmailCountersResponse EmailCounters = YandexManager.GetUnreadEmailCount(AppSettingsValues.GetDomainActiveUserEmailCreation, "*****@*****.**");

            return(JsonConvert.SerializeObject(EmailCounters.counters, Formatting.Indented));
        }