做过接受邮件的帮忙看看 我参数写的对不对啊。。 就是报错啊

lijing3333 2011-08-24 02:54:55

protected void Button1_Click(object sender, EventArgs e)
{
string path = "d:\\";
string name = "李静";
string poptity = "1";
string sendEmail = "644591331@qq.com";
string sub = "sdzfsdfsdfsdfsdf";
string body = "dfsdfsdfsdfdsf";
string data = "pop.qq.com";
int num = 0;
ReciveMail("644591331", "密码", ref poptity, ref name, ref sendEmail, ref sub, ref body, ref path, ref data, out num, "d:\\");
}



/// <summary>
/// 利用JMAIl接收邮件
/// </summary>
/// <param name="mailname">油箱用户名称</param>
/// <param name="mailpwd">油箱密码</param>
/// <param name="poptity">等级</param>
/// <param name="senders">发送者</param>
/// <param name="sendmail">发件人地址</param>
/// <param name="subject">主题</param>
/// <param name="body">内容</param>
/// <param name="path">路径</param>
/// <param name="data">数据</param>
/// <param name="num1">输出参数</param>

public static void ReciveMail(string mailname, string mailpwd, ref string poptity, ref string senders, ref string sendmail, ref string subject, ref string body, ref string path, ref string data, out int num1, string paths)
{
num1 = 1;
jmail.POP3Class popMail = new jmail.POP3Class();
jmail.Message mailMessage;
jmail.Attachments atts;
jmail.Attachment att;
//string pop = "pop." + mailname.Substring(mailname.IndexOf("@") + 1);

string pop = "pop.qq.com";
//这个地方就报错 错误信息:This function is not included in this version of jmail.
popMail.Connect(mailname, mailpwd, pop, 110);
if (0 < popMail.Count)
{
for (int i = 1; i <= popMail.Count; i++)
{
mailMessage = popMail.Messages[i];
atts = mailMessage.Attachments;
mailMessage.Charset = "GB2312";
mailMessage.Encoding = "Base64";
mailMessage.ISOEncodeHeaders = false;
poptity = mailMessage.Priority.ToString();
senders = mailMessage.FromName;
sendmail = mailMessage.From;
subject = mailMessage.Subject;
body = mailMessage.Body;
data = mailMessage.Date.ToString();
string size = mailMessage.Size.ToString();
for (int j = 0; j < atts.Count; j++)
{
if (j == 0)
{
//取得附件名称
att = atts[j];
/**/
/**/
/**/
///附件名称

string attname = att.Name;
// int k = attname.LastIndexOf(".");
// string time = DateTime.Now.ToString();
// time = time.Replace("-","");
// time = time.Replace(" ","");
// time = time.Replace(":","");
// attname = attname.Insert(attname.LastIndexOf("."),"-"+time);
/**/
///上传到服务器
//path="D:\\Mail\\mailre\\"+attname;
string all = paths + "\\Mail\\MailReceive\\";
path = all + attname;
DirectoryInfo dir = new DirectoryInfo(all);

if (dir.Exists)
{
att.SaveToFile(path);
}
else
{
dir.Create();
att.SaveToFile(path);
}
}


}
popMail.DeleteSingleMessage(i);//删除邮件
}
att = null;
atts = null;
popMail.Disconnect();
popMail = null;
}
else
{

num1 = 0;
att = null;
atts = null;
popMail.Disconnect();
popMail = null;
}
}


jamail组件也注册了。。。 用的是4.5版的 在多特下载的。 但是现在报错:
This function is not included in this version of jmail.
不知道什么原因!!! 求教了
...全文
81 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2011-08-24
  • 打赏
  • 举报
回复
.net本身都能发邮件,你干嘛还要jmail?
子夜__ 2011-08-24
  • 打赏
  • 举报
回复
This function is not included in this version of jmail.

版本不对哦 换个

下载
huangwenquan123 2011-08-24
  • 打赏
  • 举报
回复
你试试
别人提供的版本。http://blog.csdn.net/woshiqq/article/details/2599813
huangwenquan123 2011-08-24
  • 打赏
  • 举报
回复
This function is not included in this version of jmail.
这个版本不包含这个功能。
孟子E章 2011-08-24
  • 打赏
  • 举报
回复
你的这个版本里面没有相应的函数。
你应该去买高级版本的。
免费的一般是个人版
C5662601 2011-08-24
  • 打赏
  • 举报
回复

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧