日期:2014-05-17  浏览次数:21065 次

如何将整个网页发送到会员的邮箱中?
记得那里有很小的几行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做为邮件的正文就好了