Send Email from a Script using CDO

Here is a code snippet of a script that uses CDO to send email from a computer. 

 Set objEml = CreateObject("CDO.Message")
 objEml.From = ""
 objEml.To = ""
 objEml.Subject = "Sample Message"
 objEml.Textbody = "Test Message from Test User"
 Msgbox "Mail Sent!!"

Please note that the script will work only where SMTP Service has been installed.

Comments (2)
  1. Contrary to popular belief, the end of the year is one of the best times to look for, awesome descion

Comments are closed.

Skip to main content