How can I send an email message from within a VBScript script?

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 = “ali@alibutt.com”
objMessage.To = “you@yourself.com”
objMessage.TextBody = “test mail”
objMessage.Send

Related Posts Plugin for WordPress, Blogger...

Got anything to say? Go ahead and leave a comment!