Example #1
0
        private void MakeEmail(EmailInfo EInfo, List <string> ListFileName, List <string> ListAddress, SqlHelper help, List <string> ListSupervisor)
        {
            if (Common.Common.MailPassword != "")
            {
                EInfo.User     = Common.Common.MailAddress;
                EInfo.PassWord = Common.Common.MailPassword;
                EmailRecordInfo ERecord;
                sentnum = ListFileName.Count;
                for (int i = 0; i < ListFileName.Count; i++)
                {
                    EInfo.AddFiles = ListFileName[i];
                    EInfo.Content  = "";
                    EInfo.Receiver = ListAddress[i];
                    EInfo.Title    = DateTime.Now + "听课安排";
                    string successflag = "";
                    ERecord = new EmailRecordInfo(ListSupervisor[i], "督导", EInfo.Title, ListSupervisor[i] + DateTime.Now.ToLongTimeString() + i, "听课安排", successflag, ListFileName[i]);

                    AsynEmail EmailSendPoccess = new AsynEmail(EInfo, ERecord, this.EmailResultCallBack);
                    EmailSendPoccess.ThreadSend();
                    //MessageBox.Show(successflag);
                    //help.Insert(ERecord,"Logs_Data");
                    Main.fm.SetStatusText("正在发送邮件", 0);
                }
            }
            else
            {
                MessageBox.Show("发件人邮箱不能为空,请设置发件人邮箱!");
            }
        }
Example #2
0
        public void SentResult()
        {
            EmailInfo EInfo = InitializeEmailInfo();

            string flag="";
            EmailRecordInfo record = new EmailRecordInfo(Listview.CheckedItems[0].SubItems[6].Text, "受听课教师", EInfo.Title, Listview.CheckedItems[0].SubItems[6].Text + DateTime.Now.ToShortTimeString(), "听课反馈结果", flag, FilePath);

            AsynEmail EmailSendPoccess = new AsynEmail(EInfo, record, this.EmailResultCallBack);
            EmailSendPoccess.ThreadSend();
            Main.fm.SetStatusText("正在发送邮件", 0);
            //help.Insert(record,"Logs_Data");
            //MessageBox.Show(flag);
        }
Example #3
0
        public void SentResult()
        {
            EmailInfo EInfo = InitializeEmailInfo();

            string          flag   = "";
            EmailRecordInfo record = new EmailRecordInfo(Listview.CheckedItems[0].SubItems[6].Text, "受听课教师", EInfo.Title, Listview.CheckedItems[0].SubItems[6].Text + DateTime.Now.ToShortTimeString(), "听课反馈结果", flag, FilePath);

            AsynEmail EmailSendPoccess = new AsynEmail(EInfo, record, this.EmailResultCallBack);

            EmailSendPoccess.ThreadSend();
            Main.fm.SetStatusText("正在发送邮件", 0);
            //help.Insert(record,"Logs_Data");
            //MessageBox.Show(flag);
        }
Example #4
0
        private void buttonX2_Click(object sender, EventArgs e)
        {
            if (listView1.CheckedItems.Count == 1)
            {
                EmailInfo EInfo = InitializeEmailInfo();
                EmailRecordInfo RInfo = new EmailRecordInfo();
                RInfo.Email_Receiver = listView1.CheckedItems[0].SubItems[1].Text;
                RInfo.Email_Theme = listView1.CheckedItems[0].SubItems[3].Text;
                RInfo.Enclosure_Path = "";
                RInfo.Email_Type = listView1.CheckedItems[0].SubItems[5].Text;
                RInfo.File_State = "";
                RInfo.Time_Now = "";
                RInfo.Teacher_Identity = listView1.CheckedItems[0].SubItems[2].Text;
                AsynEmail EmailSendPoccess = new AsynEmail(EInfo, RInfo, this.EmailResultCallBack);
                EmailSendPoccess.ThreadSend();
                Main.fm.SetStatusText("正在发送邮件", 0);

            }
        }
Example #5
0
        private void MakeEmail(EmailInfo EInfo,List<string> ListFileName,List<string> ListAddress,SqlHelper help,List<string> ListSupervisor)
        {
            if (Common.Common.MailPassword !="")
            {
                EInfo.User = Common.Common.MailAddress;
                EInfo.PassWord = Common.Common.MailPassword;
                EmailRecordInfo ERecord;
                sentnum = ListFileName.Count;
                for (int i = 0; i < ListFileName.Count; i++)
                {
                    EInfo.AddFiles = ListFileName[i];
                    EInfo.Content = "";
                    EInfo.Receiver = ListAddress[i];
                    EInfo.Title = DateTime.Now + "听课安排";
                    string successflag = "";
                    ERecord = new EmailRecordInfo(ListSupervisor[i], "督导", EInfo.Title, ListSupervisor[i] + DateTime.Now.ToLongTimeString() + i, "听课安排", successflag, ListFileName[i]);

                    AsynEmail EmailSendPoccess = new AsynEmail(EInfo, ERecord, this.EmailResultCallBack);
                    EmailSendPoccess.ThreadSend();
                    //MessageBox.Show(successflag);
                    //help.Insert(ERecord,"Logs_Data");
                    Main.fm.SetStatusText("正在发送邮件", 0);
                }
            }
            else MessageBox.Show("发件人邮箱不能为空,请设置发件人邮箱!");
        }