Set objMessage = CreateObject("CDO.Message")
objMessage.From = WScript.Arguments(0)
objMessage.To = WScript.Arguments(1)
objMessage.Cc = WScript.Arguments(2)
objMessage.Bcc = WScript.Arguments(3)
objMessage.Subject = WScript.Arguments(4)
objMessage.TextBody = WScript.Arguments(5) & vbcrlf
objMessage.AddAttachment WScript.Arguments(6)
'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP_SERVER_NAME"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
I have a client that is (successfully) using the BLAT command line utility to send email and attachments using SMTP. I think it was approved by the IT departments security group. The VB option may not have been approved if they had tried that. Don’t know for sure.
manually executed from command prompt? if so on the job server box’s command prompt or on your local machine? Did you used 8 as the flag? Flag 8 should say the Standard Error
Much easier way is to use some third party tools, such as SENDMAIL. you don’t need o install, just download, and execute the file SENDMAIL.exe from command line.