|
8楼
楼主 |
发表于 2008-5-27 09:56:55
|
只看该作者
谢谢回复。最后还是通过EVENTSINK来解决的。不过没有办法实现中文
Sub IEventIsCacheable_IsCacheable()
'To implement the interface, and return S_OK implicitly
End Sub
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
Dim SubjectToFind
Dim SaveFolder
Dim MsgStream
Dim iFound
SubjectToFind="words"
SaveFolder="c:\"
iFound=InStr(1,Msg.Subject,SubjectToFind,1)
if iFound > 0 then
set MSGStream= Msg.Getstream
SaveFile=SaveFolder & Msg.Senton & iFound & msg.subject & ".eml"
SaveFile=Replace(SaveFile, "/", "_")
SaveFile=Replace(SaveFile, " ", "_")
SaveFile=Replace(SaveFile, ":", "_",3)
MsgStream.SaveToFile savefile,2
MsgStream.Close
Set MsgStream = Nothing
set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "c:\*.eml" , "M:\"
end if
End Sub
</SCRIPT> |
|