求高手解答一下,像开心网邀请好友,导出Email联系人列表 输出邮箱名和密码,倒出该邮箱内的联系人列表像开心网那个邀请好友一样有高手会吗? 在线等。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个要根据邮箱系统分别编程。原理就是模拟浏览器的访问,发送请求,然后分析Respose的内容。using System.Net; WebRequest req = WebRequest.Create( "http://www.aaa.com/bbb.aspx" ); req.Method = "POST"; //指定提交的Method,可以为POST和GET,一定要大写 byte[] postData = System.Text.Encoding.GetEncoding("gb2312").GetBytes( "?param1=aaa¶m2=bbb" );//Post的数据 req.ContentLength = postData.Length; Stream postStream = req.GetRequestStream(); postStream.Write(postData, 0, postData.Length); postStream.Close(); WebResponse res = req.GetResponse(); System.Text.Encoding resEncoding = System.Text.Encoding.GetEncoding("gb2312");//接收的编码 StreamReader reader = new StreamReader( res.GetResponseStream(),resEncoding ); string html = reader.ReadToEnd(); //接收的Html reader.Close(); res.Close(); 然后就是解析返回的内容,取出你想要的邮件列表。 你说的这种都是用outlook如果没有outlook岂不是不行? 点击添加附件还能弹出框框,请教解决办法 求助一个正则表达式 brother help 挂在FTP的网站Fill: SelectCommand.Connection 属性尚未初始化。 请问如何清空HtmlSelect内的选项? 将数据集保存到viewstate中,postback时,回原数据集为何出错。 多个.cs文件如何编译成一个DLL文件 为什么我的网址中间多了一串奇怪的字符串? 使用page.application的问题,用applicaton保存状态信息是否可行? 上传图片到指定网站,未能找到路径的一部分 一个关于checkbox单选的问题 大哥们来帮我看下 ! 制作CHM帮助文档
WebRequest req = WebRequest.Create( "http://www.aaa.com/bbb.aspx" );
req.Method = "POST"; //指定提交的Method,可以为POST和GET,一定要大写
byte[] postData = System.Text.Encoding.GetEncoding("gb2312").GetBytes( "?param1=aaa¶m2=bbb" );//Post的数据
req.ContentLength = postData.Length;
Stream postStream = req.GetRequestStream();
postStream.Write(postData, 0, postData.Length);
postStream.Close();
WebResponse res = req.GetResponse();
System.Text.Encoding resEncoding = System.Text.Encoding.GetEncoding("gb2312");//接收的编码
StreamReader reader = new StreamReader( res.GetResponseStream(),resEncoding );
string html = reader.ReadToEnd(); //接收的Html
reader.Close();
res.Close(); 然后就是解析返回的内容,取出你想要的邮件列表。
你说的这种都是用outlook如果没有outlook岂不是不行?