Risolto...l'unico problema è che mi chiede user e password per inviare mail...come posso aggiungere questi campi allo script?
codice:
dim filename1
dim filename2
filename1="c:\sitelist.txt"
filename2="c:\textstream.txt"
Set oFSO1 = CreateObject("Scripting.FileSystemObject")
Set oFSO2 = CreateObject("Scripting.FileSystemObject")
Set oTextFile1 = oFSO1.OpenTextFile(filename1, 1 , True)
Set oTextFile2 = oFSO2.OpenTextFile(filename2, 1 , True)
While oTextFile1.AtEndOfStream <> True
line1 = oTextFile1.ReadLine
line2 = oTextFile2.ReadLine
if (line1<>line2) then
Mail = "Different files" & vbcrlf & line1 & vbcrlf & line2
end if
wend
'if the second file has more strings i get the notify
if (oTextFile2.AtEndOfStream <> True) then
Mail = "Different Files"
oTextFile1.close
oTextFile2.close
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "fox80129@xxx.com"
objEmail.To = "fox80129@xxxx.com"
objEmail.Subject = "oggetto"
objEmail.Textbody = Mail
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.virgilio.it"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
wscript.echo "Response Retrieve Mail sent"
End If