首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

怎么将整个网页发送到会员的邮箱中

2012-03-19 
如何将整个网页发送到会员的邮箱中?记得那里有很小的几行code就解决了将整个网页群发到会员的邮箱中。用时

如何将整个网页发送到会员的邮箱中?
记得那里有很小的几行code   就解决了将整个网页群发到会员的邮箱中。用时却再也搜不到了???
请问高见,谢谢

[解决办法]
'-----------------------本函数为远程获取内容的函数,URL即为网页地址,asp页面也行-----
Function GetBody(url)
Set Retrieval = CreateObject( "Microsoft.XMLHTTP ")
With Retrieval
.Open "Get ", url, False, " ", " "
.Send
GetBody = .ResponseBody
End With
End Function

'--------------------------内码处理的函数,否则发送的邮件可能是乱码
Function BytesToBstr(strBody,CodeBase)
dim objStream
set objStream = Server.CreateObject( "Adodb.Stream ")
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write strBody
objStream.Position = 0
objStream.Type = 2
objStream.Charset = CodeBase
BytesToBstr = objStream.ReadText
objStream.Close
set objStream = nothing
End Function


strContent = BytesToBstr(GetBody( "要发送的页面 "), "gb2312 ")


把strContent做为邮件的正文就好了

热点排行