急急急!!!asp.net中用Jmail发邮件出现怎么解决啊?高手指导???

来源:百度知道 编辑:UC知道 时间:2024/07/01 06:42:00
public bool sendEmail(string Sender, string Receiver, string Subject, string Content, string server)
{
int sunEmail = 0;
jmail.MessageClass myJmail = new jmail.MessageClass();
myJmail.Charset = "GB2312";
myJmail.ISOEncodeHeaders = false;
myJmail.From = Sender;
myJmail.Subject = Subject;
myJmail.AddRecipient(Receiver, "", "");
if (FileUp.PostedFile.ContentLength != 0)
{
string filepath = FileUp.PostedFile.FileName;
myJmail.AddAttachment(filepath, false, "");
}
myJmail.Body = Content;
return myJmail.Send(server, true);
}
就是最后一句话 return myJmail.send(server,true);出现This function is not included int this version of jmail 的问题
jmail老是出错,不是还有vs05自带的那种发邮件的吗?那个自带的怎么弄啊?我也试过它提示说邮箱不错在,然后后面还有乱码?知道的发我邮箱lijunli256@163.com

我记得JMAIL只有MESSAGE对象,没有MessageClass 对象
所以出现"This function is not included int this version of jmail "的问题

我都用的MESSAGE写的,你换个试试 应该就没问题了!!
From.Subject 这些属性到是对的

ASP.NET跟踪发出的信息来解决啊.到百度找下就知道了