Im having problem VBS trying to email errors. here is the error Line 1 Char 13 Error Subscript out of Range Code 800A0009
Dim param1: param1 = WScript.Arguments(0)
EmailTo = "[email protected]"
Set oWshNetwork = WScript.CreateObject("WScript.Network")
ComputerName = oWshNetwork.ComputerName
Set objEmail = CreateObject("CDO.Message")
objEmail.From = ComputerName & "@email.com"
objEmail.To = EmailTo
objEmail.Subject = "TESTING"
objEmail.Textbody = objEmail.Textbody & vbCrLf & "Please see attached log file for batches
unzipped yesterday."
objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.mail.com"
objEmail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.AddAttachment param1
objEmail.Send
Thanks for all your help!