1
jmail.Message Jmail = new jmail.Message();
2
3
Jmail.Silent = true;
4
Jmail.Logging = true;
5
Jmail.Charset = "GB2312";
6
Jmail.ContentType = "text/html";
7
Jmail.AddRecipient("junjun0803@126.com", "", "");//添加收件人
8
Jmail.From = "junjun@tom.com";//发信人地址;
9
Jmail.MailServerUserName = "junjun0803";//发件人邮件用户名
10
Jmail.MailServerPassWord = "123456";//发件人密码
11
Jmail.Subject = "标题";//标题
12
Jmail.Body = "内容";//邮件正文
13
Jmail.Send("smtp.126.com", false);//这里写smtp服务器地址
14
Jmail.Close();
2
3
4
5
6
7
8
9
10
11
12
13
14