Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            this.Icon = global::MMail.Win.Properties.Resources.mms;
            this.notifyIcon1.Icon = global::MMail.Win.Properties.Resources.email_send;

            this._stop = true;
            this._isLog = false;
            this._notes = true;

            this._sendFail = 0;
            this._sendOk = 0;
            this._total = 0;
            this._current = 0;

            this._config = new MNConfig();

            this.xresvr = new MXResolver();
            this.xresvr.CacheEnable = true;

            this.files = new List<string>();
            this.domains = new Dictionary<string, int>();

            this.mdeliver = new MNDeliver();

            this.mdeliver.OnStart += createJob;
            this.mdeliver.OnLog += onLog;
            this.mdeliver.OnRun += Run;
        }
Пример #2
0
        private List<string> getMxRecord(string dnsServ, string domain)
        {
            MXResolver rx = new MXResolver(dnsServ);
            
            rx.TimeOut = 5;          

            List<string> mxl = new List<string>();

//            Question q = new Question(domain, QType.MX, QClass.IN);

            Response resp = rx.Query(domain);  

            foreach (RecordMX recordMX in resp.RecordsMX)
            {
                mxl.Add(recordMX.EXCHANGE.TrimEnd('.'));
            }

            return mxl;
        }