Jmail发送邮件技巧
时间:2011-01-05 来源:hfliyi
代码如下:
代码1 jmail.Message mail = new jmail.Message();
2 mail.Charset = "GB2312";//字符编码 -简体中文
3 mail.ISOEncodeHeaders = false;
4 mail.From = "收件人邮箱地址";
5 mail.FromName = "收件人的姓名";
6 mail.Subject = this.txtSubject.Text.Trim();
7 mail.MailServerUserName = "发件者邮箱用户名";
8 mail.MailServerPassWord = "发件者邮件密码";
9 mail.AddRecipient(this.txtTo.Text, "收件人姓名", "");
10 mail.Body = this.richTextBox1.Text;
11 mail.Send("mail.tarena.com.cn", false);
12
相关阅读 更多 +