| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 470 人关注过本帖
标题:[求助]在程序里发送邮件为什么不能发中文啊
只看楼主 加入收藏
suntao163
Rank: 1
等 级:新手上路
帖 子:58
专家分:0
注 册:2006-8-19
收藏
 问题点数:0 回复次数:0 
[求助]在程序里发送邮件为什么不能发中文啊

我在程序中写的发送邮件的程序,能够成功发送,但是在查看时,标题正确,邮件内容如果是中文的话就会出现“Error Reading Message or message with NULL body!! ”错误,如果内容是英文的话就显示正常。这个是什么意思啊,应该怎么解决啊 ?望各位帮忙
string name=this.TextBox1.Text;
string address=this.Textbox2.Text;
string lianxi=this.Textbox3.Text;
string xinxi=this.Textbox4.Text;
MailMessage mymail=new MailMessage();
mymail.To="收件人";
mymail.From="发件人";
mymail.Subject=name;

string items=name+address+lianxi+xinxi;
mymail.Body=items;


mymail.BodyFormat=MailFormat.Html;
mymail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1" );
mymail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "email" );
mymail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password" );
mymail.Priority =MailPriority.High;

SmtpMail.SmtpServer ="www.ldate.org.cn";
SmtpMail.Send(mymail);
Response.Write("<script>alert('提交成功!');this.location='index.aspx';</script>");

搜索更多相关主题的帖子: 邮件 中文 
2007-05-22 21:26
快速回复:[求助]在程序里发送邮件为什么不能发中文啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017948 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved