using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JobReportMailService
{
    public static class Pub
    {
      //  public static string vGcode = "EET1P";
        public static CSetting setting;
        public static Boolean debugmode = false;

        public static string MailSort(string addr, string except)
        {
            if (string.IsNullOrEmpty(except)) return addr;
            var alist = addr.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList();
            var elist = except.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList();
            foreach (var item in elist)
                alist.Remove(item);
            if (alist.Count < 1) return string.Empty;
            return string.Join(";", alist);
        }
        public static void init()
        {
            setting = new CSetting();
            setting.Load();
        }
    }
}
