Ali’s Knowledge Base
Destination Cloud …

Ali’s Knowledge Base

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

June 17th, 2005 . by Ali

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

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

Name

Mail (never published)

Website