Click here to Skip to main content
15,881,687 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
im using below script, but not working

VB
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "mail id"
objEmail.To = "mail id"
objEmail.Subject = "Service Is Down"
objEmail.Textbody = "The Service ### has stopped."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.Gmail.com"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 143
objEmail.Configuration.Fields.Update
objEmail.Send
Posted
Updated 20-Jul-15 19:24pm
v2
Comments
Wendelius 21-Jul-15 1:25am    
Few questions:
- do you get an error, if you do what
- how do you call this when the service stops
- have you tested this without a service, does it work as stand-alone

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900