62,046
社区成员
发帖
与我相关
我的任务
分享
try {
WebClient client = new WebClient();
Byte[] pageData = client.DownloadData("http://www.baidu.com");
string pageHtml = Encoding.ASCII.GetString(pageData);
//pageHtml就是百度生产的源文件,可以把这个当做邮件内容发送出去
}
catch (WebException webEx) {
if(webEx.Status == WebExceptionStatus.ConnectFailure) {
Console.WriteLine("");
}
}