Looking for some help on a vbscript I have been using for years that suddenly stopped working a couple days ago. Here is the background -
I run this little script on my home computer via Task Scheduler, it runs once per hour on the hour from 6AM-5PM. I use it to send an email to myself at work to make sure outside mail is working. If I don't get an email at the top of the hour I make a quick check of everything. It's useful especially when a user says they are expecting an email from an outside source and haven't gotten it, I can at least verify that the problem probably is not a universal outage. So anyway, here is the script, minus the specific emails/server/recipient information:
SMTPServer = "mail.MY-ISP.net"
Recipient = "sprkymrk@myworkemail.com"
From = "my.home.email@MY-ISP.net"
Subject = "External Email Test"
Message = "This is a test message to verify email functionality from outside."
GenericSendmail SMTPserver, From, Recipient, Subject, Message
' Begin Sub
' ------------------------------------------------------------------
' Generic function to send mail using a remote
' SMTP server. Pass SMTPserver, From address,
' Recipient address, Subject, and Message as arguments
' ------------------------------------------------------------------
Sub GenericSendmail (SMTPserver, From, Recipient, Subject, Message)
set msg = WScript.CreateObject("CDO.Message")
msg.From = From
msg.To = Recipient
msg.Subject = Subject
msg.TextBody = Message
msg.Configuration.Fields ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msg.Configuration.Fields.Update
msg.Send
End Sub
The error I get is on the line with "msg.Send". For the last two days it kicks up the error:
"The transport failed to connect to the server".
Code 80040213
Source CDO.Message.1
Help! Thanks!