Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
June 14, 2005
A. If you have Microsoft IIS with SMTP installed on a server, you can use the following code to send a basic email message from within a script:
Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "Subject"objMessage.Sender = "[email protected]"objMessage.To = "[email protected]"objMessage.TextBody = "Your identity is compromised."objMessage.Send
(Substitute your own email information and message text.) You can insert this code into any script that requires a message to be sent.
You May Also Like