Rather than modifying previous posted scripts I am sharing this time a script that will just send an email from VBS. Optionally you can use authentication if you just supply the credentials: A couple of examples showing how to use it to send internal (sampleDomain) non SSL authenticated emails and externals SSL autheticated ones (gmail)
C:\>cscript c:\scripts\events\sendEmail.vbs smtp.company.com 25 corporateUser@company.com anotherCorporateUser@company.com "testing smtp from windows vbs" "Just a test" C:\>cscript c:\scripts\events\sendEmail.vbs smtp.gmail.com 465 gmailUser@gmail.com corporateUser@company.com "testing smtp from windows vbs" "Just a test" gmailUser@gmail.com gmaiUserPassword
2 comments:
Hey Nestor, I tried out your VBS sendmail script. You should comment out line 78, because it causes a compile time error.
this is what I got:
C:\Bin\sendmail.vbs(78, 1) Microsoft VBScript compilation error: Expected statement
Biff, Thanks for the heads up. I have moved the code to a gist which does not end up in error formatting.
Post a Comment