Ejemplo n.º 1
0
        void BeginPushData(SettingChooseFile setting)
        {
            string connectionString = txtConnString.Text;

            DBLib.SMTPSetting smtpSetting = new DBLib.SMTPSetting(txtMailServerAddress.Text, Convert.ToInt32(txtSMTPServerPort.Text), txtUser.Text, txtPassword.Text, chkEnableSecurity.Checked, chkUseGmail.Checked);
            smtpSetting.MailAddressSend    = txtUser.Text;
            smtpSetting.MailAddressReceive = txtMailTo.Text;

            if (chkEnableSecurity.Checked)
            {
                smtpSetting.CAPath = txtCAPath.Text;
            }

            dbLibClient = new DBLib.DBClientApi("TTHTSS", smtpSetting, setting);
            dbLibClient.LoginMailServer();

            dbLibClient.intervalRequest  = Convert.ToDouble(txtTimerInterval.Text);
            dbLibClient.connectionString = connectionString;

            processReadMail = new Thread(MethodSendMail);
            processReadMail.Start(dbLibClient);
        }
Ejemplo n.º 2
0
 void MethodSendMail(object obj)
 {
     DBLib.DBClientApi _dbLib = (DBLib.DBClientApi)obj;
     _dbLib.StartConnectDB();
 }