How can I send an e-mail from a vbs script - on a machine that cannot connect to the internet (it's in my non-internet zone).
I've hacked the following together from my googling, but is seems to require a call to Microsoft's server. What about the situation where I'm not able to reach microsoft.com?
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ''cdoSendUsingPort
.Item(sch & "smtpserver") = "my_internal_mail_server"
.update
End With
Set objEmail = CreateObject("CDO.Message")
set objEmail.configuration = cdoConfig
objEmail.From = "[email protected]"
objEmail.To = "[email protected]"
objEmail.Subject = "Server is down!"
objEmail.Textbody = "Run out the guns!!!"
objEmail.Send
MsgBox "Script Complete"
(I have an internal SMTP server... the problem is having to poll the MS server)