Dim Dim Dim Dim Dim Dim Dim
SMTPServer SMTPPort Mail_from Mail_to Subject Body Attach
SMTPServer = WScript.Arguments(0) SMTPPort = WScript.Arguments(1) Mail_from = WScript.Arguments(2) Mail_to = WScript.Arguments(3) Subject = WScript.Arguments(4) Body= WScript.Arguments(5) Attach= WScript.Arguments(6) set imsg = createobject("cdo.message") set iconf = createobject("cdo.configuration") Set Flds = iConf.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer .Update End With With iMsg Set .Configuration = iConf .To = Mail_to .From = Mail_from .Subject = Subject .TextBody = Body .AddAttachment Attach .fields.update .Send End With set imsg = nothing set iconf = nothing