亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? frmsendmail.cs

?? Winform_OnlineTraning.rar 培訓機構的案例在線培訓
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Web;
using System.Web.Mail;


namespace SendMail
{
	/// <summary>
	/// Summary description for frmSendMail.
	/// </summary>
	public class frmSendMail : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btnRemove;
		private System.Windows.Forms.ListBox lstFiles;
		private System.Windows.Forms.Label lblSMTP;
		private System.Windows.Forms.Label lblSubject;
		private System.Windows.Forms.Label lblBcc;
		private System.Windows.Forms.Label lblCc;
		private System.Windows.Forms.Label lblTo;
		private System.Windows.Forms.Label lblFrom;
		private System.Windows.Forms.TextBox txtSubject;
		private System.Windows.Forms.TextBox txtBcc;
		private System.Windows.Forms.TextBox txtCc;
		private System.Windows.Forms.TextBox txtTo;
		private System.Windows.Forms.TextBox txtFrom;
		private System.Windows.Forms.TextBox txtIP;
		private System.Windows.Forms.Button txtAttach;
		private System.Windows.Forms.Button btnSend;
		private System.Windows.Forms.RichTextBox txtBody;
		private System.Windows.Forms.OpenFileDialog ofdAttach;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
		
		//Create a message object to contain a complete email.
		private MailMessage message;
		
		
		public frmSendMail()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			
			//Initialize the message object
			message=new MailMessage();
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.btnRemove = new System.Windows.Forms.Button();
			this.lstFiles = new System.Windows.Forms.ListBox();
			this.lblSMTP = new System.Windows.Forms.Label();
			this.lblSubject = new System.Windows.Forms.Label();
			this.lblBcc = new System.Windows.Forms.Label();
			this.lblCc = new System.Windows.Forms.Label();
			this.lblTo = new System.Windows.Forms.Label();
			this.lblFrom = new System.Windows.Forms.Label();
			this.txtSubject = new System.Windows.Forms.TextBox();
			this.txtBcc = new System.Windows.Forms.TextBox();
			this.txtCc = new System.Windows.Forms.TextBox();
			this.txtTo = new System.Windows.Forms.TextBox();
			this.txtFrom = new System.Windows.Forms.TextBox();
			this.txtIP = new System.Windows.Forms.TextBox();
			this.txtAttach = new System.Windows.Forms.Button();
			this.btnSend = new System.Windows.Forms.Button();
			this.txtBody = new System.Windows.Forms.RichTextBox();
			this.ofdAttach = new System.Windows.Forms.OpenFileDialog();
			this.SuspendLayout();
			// 
			// btnRemove
			// 
			this.btnRemove.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnRemove.Location = new System.Drawing.Point(470, 422);
			this.btnRemove.Name = "btnRemove";
			this.btnRemove.Size = new System.Drawing.Size(77, 26);
			this.btnRemove.TabIndex = 37;
			this.btnRemove.Text = "刪除(&R)";
			this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
			// 
			// lstFiles
			// 
			this.lstFiles.ItemHeight = 12;
			this.lstFiles.Location = new System.Drawing.Point(86, 388);
			this.lstFiles.Name = "lstFiles";
			this.lstFiles.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
			this.lstFiles.Size = new System.Drawing.Size(375, 52);
			this.lstFiles.TabIndex = 36;
			// 
			// lblSMTP
			// 
			this.lblSMTP.AutoSize = true;
			this.lblSMTP.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblSMTP.Location = new System.Drawing.Point(269, 19);
			this.lblSMTP.Name = "lblSMTP";
			this.lblSMTP.Size = new System.Drawing.Size(77, 16);
			this.lblSMTP.TabIndex = 30;
			this.lblSMTP.Text = "SMTP 服務器";
			// 
			// lblSubject
			// 
			this.lblSubject.AutoSize = true;
			this.lblSubject.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblSubject.Location = new System.Drawing.Point(24, 123);
			this.lblSubject.Name = "lblSubject";
			this.lblSubject.Size = new System.Drawing.Size(29, 16);
			this.lblSubject.TabIndex = 29;
			this.lblSubject.Text = "主題";
			// 
			// lblBcc
			// 
			this.lblBcc.AutoSize = true;
			this.lblBcc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblBcc.Location = new System.Drawing.Point(24, 97);
			this.lblBcc.Name = "lblBcc";
			this.lblBcc.Size = new System.Drawing.Size(54, 16);
			this.lblBcc.TabIndex = 28;
			this.lblBcc.Text = "密件抄送";
			// 
			// lblCc
			// 
			this.lblCc.AutoSize = true;
			this.lblCc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblCc.Location = new System.Drawing.Point(24, 71);
			this.lblCc.Name = "lblCc";
			this.lblCc.Size = new System.Drawing.Size(29, 16);
			this.lblCc.TabIndex = 27;
			this.lblCc.Text = "抄送";
			// 
			// lblTo
			// 
			this.lblTo.AutoSize = true;
			this.lblTo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblTo.Location = new System.Drawing.Point(24, 45);
			this.lblTo.Name = "lblTo";
			this.lblTo.Size = new System.Drawing.Size(42, 16);
			this.lblTo.TabIndex = 26;
			this.lblTo.Text = "收件人";
			// 
			// lblFrom
			// 
			this.lblFrom.AutoSize = true;
			this.lblFrom.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.lblFrom.Location = new System.Drawing.Point(24, 19);
			this.lblFrom.Name = "lblFrom";
			this.lblFrom.Size = new System.Drawing.Size(42, 16);
			this.lblFrom.TabIndex = 25;
			this.lblFrom.Text = "發件人";
			// 
			// txtSubject
			// 
			this.txtSubject.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtSubject.Location = new System.Drawing.Point(86, 121);
			this.txtSubject.Name = "txtSubject";
			this.txtSubject.Size = new System.Drawing.Size(461, 20);
			this.txtSubject.TabIndex = 24;
			this.txtSubject.Text = "";
			// 
			// txtBcc
			// 
			this.txtBcc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtBcc.Location = new System.Drawing.Point(86, 95);
			this.txtBcc.Name = "txtBcc";
			this.txtBcc.Size = new System.Drawing.Size(461, 20);
			this.txtBcc.TabIndex = 23;
			this.txtBcc.Text = "";
			// 
			// txtCc
			// 
			this.txtCc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtCc.Location = new System.Drawing.Point(86, 69);
			this.txtCc.Name = "txtCc";
			this.txtCc.Size = new System.Drawing.Size(461, 20);
			this.txtCc.TabIndex = 22;
			this.txtCc.Text = "";
			// 
			// txtTo
			// 
			this.txtTo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtTo.Location = new System.Drawing.Point(86, 43);
			this.txtTo.Name = "txtTo";
			this.txtTo.Size = new System.Drawing.Size(461, 20);
			this.txtTo.TabIndex = 21;
			this.txtTo.Text = "";
			// 
			// txtFrom
			// 
			this.txtFrom.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtFrom.Location = new System.Drawing.Point(86, 17);
			this.txtFrom.Name = "txtFrom";
			this.txtFrom.Size = new System.Drawing.Size(173, 20);
			this.txtFrom.TabIndex = 20;
			this.txtFrom.Text = "";
			// 
			// txtIP
			// 
			this.txtIP.Location = new System.Drawing.Point(365, 17);
			this.txtIP.Name = "txtIP";
			this.txtIP.Size = new System.Drawing.Size(182, 21);
			this.txtIP.TabIndex = 19;
			this.txtIP.Text = "";
			// 
			// txtAttach
			// 
			this.txtAttach.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.txtAttach.Location = new System.Drawing.Point(470, 388);
			this.txtAttach.Name = "txtAttach";
			this.txtAttach.Size = new System.Drawing.Size(77, 26);
			this.txtAttach.TabIndex = 33;
			this.txtAttach.Text = "附件(&A)";
			this.txtAttach.Click += new System.EventHandler(this.txtAttach_Click);
			// 
			// btnSend
			// 
			this.btnSend.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.btnSend.Location = new System.Drawing.Point(86, 457);
			this.btnSend.Name = "btnSend";
			this.btnSend.Size = new System.Drawing.Size(77, 25);
			this.btnSend.TabIndex = 32;
			this.btnSend.Text = "發送(&S)";
			this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
			// 
			// txtBody
			// 
			this.txtBody.Location = new System.Drawing.Point(86, 155);
			this.txtBody.Name = "txtBody";
			this.txtBody.Size = new System.Drawing.Size(461, 224);
			this.txtBody.TabIndex = 31;
			this.txtBody.Text = "";
			// 
			// ofdAttach
			// 
			this.ofdAttach.Multiselect = true;
			// 
			// frmSendMail
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(556, 487);
			this.Controls.Add(this.btnRemove);
			this.Controls.Add(this.lstFiles);
			this.Controls.Add(this.lblSMTP);
			this.Controls.Add(this.lblSubject);
			this.Controls.Add(this.lblBcc);
			this.Controls.Add(this.lblCc);
			this.Controls.Add(this.lblTo);
			this.Controls.Add(this.lblFrom);
			this.Controls.Add(this.txtSubject);
			this.Controls.Add(this.txtBcc);
			this.Controls.Add(this.txtCc);
			this.Controls.Add(this.txtTo);
			this.Controls.Add(this.txtFrom);
			this.Controls.Add(this.txtIP);
			this.Controls.Add(this.txtAttach);
			this.Controls.Add(this.btnSend);
			this.Controls.Add(this.txtBody);
			this.Name = "frmSendMail";
			this.Text = "發送郵件";
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new frmSendMail());
		}
		//Compose the email and then send it
		private void btnSend_Click(object sender, System.EventArgs e)
		{
			//Check if SMTP Server IP address is specified.
			//If yes, compose email
			//else display appropriate message
			if (txtIP.Text.Length >0) 
			{
				//Specify the SMTP server to use 
				//to send emails
				
				SmtpMail.SmtpServer =txtIP.Text.Trim() ;
				
				//Compose email
				message.From =txtFrom.Text ;
				message.To =txtTo.Text ;
				message.Cc =txtCc.Text ;
				message.Bcc =txtBcc.Text ;
				message.Subject =txtSubject.Text ;
				message.Body=txtBody.Text;

				//Add attachements to the email if any
				message.Attachments.Clear();		
				for(int index=0;index<lstFiles.Items.Count;index++)
				{
					MailAttachment mAttach=new MailAttachment(lstFiles.Items[index].ToString());
					message.Attachments.Add(mAttach);
				}
						
				try
				{
					MessageBox.Show (message.From.ToString());
                    MessageBox.Show (message.To.ToString());
					MessageBox.Show (message.Subject.ToString());
					
					//Send the composed email
				SmtpMail.Send(message.From,message.To,message.Subject,message.Body);

					//Reset the form
					txtFrom.Text="";
					txtTo.Text="";
					txtCc.Text="";
					txtBcc.Text="";
					txtSubject.Text="";
					txtBody.Text="";
					lstFiles.Items.Clear();
				}
				catch (Exception excep)
				{
					MessageBox.Show(excep.Message.ToString() );
					MessageBox.Show(excep.StackTrace.ToString() );
					//Display appropriate message if
					//From address is invalid
					//MessageBox.Show("Enter a valid From email address");
					return;
				}
				//Visually indicate that the email was sent
				MessageBox.Show("您的郵件已發送");
			}
			else
			{
				MessageBox.Show("請輸入 SMTP 服務器 IP 地址");

			}
		}

		

		private void txtAttach_Click(object sender, System.EventArgs e)
		{
			//Display a dialog box to select
			//files to attach to the email.
			//Once selected, display the selected 
			//files in a listbox
			if(ofdAttach.ShowDialog()==DialogResult.OK)
			{
				string [] files=new string[ofdAttach.FileNames.Length];
				for(int index=0;index<ofdAttach.FileNames.Length;index++)
				{
					lstFiles.Items.Add(ofdAttach.FileNames[index].ToString());
				}
            }			
		}

		private void btnRemove_Click(object sender, System.EventArgs e)
		{
			//Remove the selected attachment from the list
			lstFiles.Items.RemoveAt(lstFiles.SelectedIndex);
			
		}

		
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品高潮呻吟| 午夜精品福利一区二区三区蜜桃| 国产a精品视频| 成人av网站在线观看| 国产999精品久久久久久| 精品污污网站免费看| 精品日韩在线观看| 在线观看精品一区| 国产精品家庭影院| 一区二区日韩电影| 亚洲va韩国va欧美va| 亚洲免费在线视频一区 二区| 亚洲欧洲av一区二区三区久久| 亚洲黄色小视频| 一区二区三区欧美日韩| 久草在线在线精品观看| 欧美mv日韩mv国产网站app| 欧美日韩亚洲国产综合| 日本久久精品电影| 777久久久精品| 久久这里只有精品首页| 中文字幕一区二区三区在线观看| 1024成人网| 天天影视涩香欲综合网 | 欧美午夜在线观看| 欧美性猛交xxxx黑人交| 制服丝袜一区二区三区| 久久美女艺术照精彩视频福利播放| 国产精品污污网站在线观看 | 自拍视频在线观看一区二区| 欧美成人r级一区二区三区| 欧美国产97人人爽人人喊| 亚洲欧美日韩一区二区 | 韩国女主播成人在线| 成人在线视频一区| 色婷婷久久久综合中文字幕 | 国产欧美日韩另类一区| 亚洲精选视频在线| 久久精品av麻豆的观看方式| 成人黄色小视频在线观看| 欧洲av一区二区嗯嗯嗯啊| 久久综合狠狠综合久久激情| 亚洲男人都懂的| 久久99精品国产91久久来源| 色综合亚洲欧洲| 精品国产一区二区三区av性色| 国产欧美日韩另类视频免费观看| 视频一区二区不卡| 91年精品国产| 久久久av毛片精品| 日本不卡123| 国产精品日韩成人| 欧美精品国产精品| 欧美电视剧免费全集观看| 精品一区二区三区影院在线午夜| 日韩欧美中文字幕制服| 天堂av在线一区| 国产午夜精品理论片a级大结局 | 国产精品久久久久久久久免费樱桃| 亚洲精品五月天| 国产一区二区三区黄视频 | 秋霞电影网一区二区| 99久久99久久精品免费看蜜桃| 欧美变态tickling挠脚心| 亚洲制服欧美中文字幕中文字幕| 成人美女在线观看| 久久久精品欧美丰满| 精品一区二区三区不卡 | 久久精品视频免费| 免费一级欧美片在线观看| 欧美日韩一区二区三区四区| 日韩一区欧美一区| 99国内精品久久| 国产欧美日本一区视频| 国产一区高清在线| 久久天堂av综合合色蜜桃网| 久久电影网站中文字幕| 8x福利精品第一导航| 午夜精品福利视频网站| 91久久精品午夜一区二区| 亚洲欧美国产三级| 色av成人天堂桃色av| 亚洲综合精品久久| 欧美精品亚洲一区二区在线播放| 亚洲电影中文字幕在线观看| 欧美视频中文一区二区三区在线观看| 一区二区三区产品免费精品久久75| av高清久久久| 一区二区三区四区视频精品免费 | 日韩电影免费在线看| 日韩一区二区三区在线视频| 老司机精品视频在线| 欧美精品一区二区在线播放| 日韩高清在线电影| 久久嫩草精品久久久久| 丁香桃色午夜亚洲一区二区三区| 国产精品素人视频| 色综合久久久久综合体桃花网| 亚洲综合色噜噜狠狠| 日韩一区二区三区视频在线 | 日韩av一区二区三区四区| 亚洲欧洲无码一区二区三区| 日本一区二区三区国色天香| 久久你懂得1024| 亚洲愉拍自拍另类高清精品| 久久疯狂做爰流白浆xx| 成人精品国产免费网站| 91精品国产综合久久久蜜臀图片 | 麻豆一区二区三| 欧美一区二区三区成人| 国产精品影视网| 亚洲男女毛片无遮挡| 91精品国产色综合久久不卡电影| 精品一区二区三区蜜桃| 亚洲人成人一区二区在线观看| 欧美日韩一本到| 国产福利视频一区二区三区| 一区二区三区 在线观看视频| 精品少妇一区二区三区视频免付费| 国产精品18久久久久久久久| 亚洲精品中文字幕乱码三区| 欧美一级高清片| 菠萝蜜视频在线观看一区| 午夜精品久久久久久久99樱桃| 久久久www成人免费无遮挡大片| 欧洲色大大久久| 国产成人免费xxxxxxxx| 日韩精品视频网站| 亚洲精品第1页| 久久伊人蜜桃av一区二区| 欧美日韩在线播放一区| 99精品在线观看视频| 国产一区美女在线| 日韩精品国产精品| 中文字幕一区在线观看| 日韩欧美国产一区二区在线播放| 色欧美片视频在线观看在线视频| 国产福利精品导航| 麻豆成人91精品二区三区| 亚洲国产精品一区二区久久恐怖片 | 国产精品天美传媒沈樵| 日韩欧美三级在线| 9191成人精品久久| 欧美日韩欧美一区二区| 91美女在线视频| 成人激情免费视频| 丁香婷婷综合五月| 懂色av噜噜一区二区三区av| 国产成人无遮挡在线视频| 国产呦精品一区二区三区网站| 美女视频第一区二区三区免费观看网站| 亚洲综合色自拍一区| 亚洲激情图片qvod| 亚洲综合久久久| 午夜精品国产更新| 午夜精品福利在线| 毛片基地黄久久久久久天堂| 免费观看久久久4p| 久久99国产精品免费| 国产在线播精品第三| 国产不卡免费视频| 91网站最新地址| 日本道色综合久久| 欧美日韩成人一区二区| 6080yy午夜一二三区久久| 欧美一级黄色录像| 久久综合久色欧美综合狠狠| 久久久不卡影院| 专区另类欧美日韩| 一区二区三区四区在线| 日韩精品乱码av一区二区| 国产综合成人久久大片91| 国产**成人网毛片九色| 色综合久久综合网| 日韩一区二区高清| 国产夜色精品一区二区av| 亚洲国产成人在线| 亚洲一二三区在线观看| 日本成人在线网站| 国产麻豆精品视频| 日本精品裸体写真集在线观看| 欧美日韩在线播放三区四区| 精品美女被调教视频大全网站| 国产精品欧美精品| 亚洲一区成人在线| 国产乱子伦视频一区二区三区 | 91久久奴性调教| 丝袜美腿一区二区三区| 国产一区二区在线影院| 99re视频精品| 7777精品伊人久久久大香线蕉| 久久久精品免费观看| 亚洲自拍与偷拍| 国产盗摄视频一区二区三区| 欧美色图激情小说| 国产亚洲成aⅴ人片在线观看| 亚洲一二三四在线| 成人视屏免费看| 日韩视频在线一区二区| 亚洲男女一区二区三区|