Industrial Automation
Industrial Automation | Europe


Main > Product Type > Software > Visualisation
Minimize Text   Default    Enlarge Text


How To Send An Email Alert From A PC Using VB Script

Sending an automatic email can be achieved with the standard Microsoft object CDO.Message. This requires you to make use of the following sample VBScript:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CX-Supervisor Message"
objMessage.From = ""
objMessage.To = ""
objMessage.TextBody = "This is some sample message text."

objMessage.Configuration.Fields.Item("") = 465
objMessage.Configuration.Fields.Item("") = 2
objMessage.Configuration.Fields.Item("") = 1
objMessage.Configuration.Fields.Item("") = 1
objMessage.Configuration.Fields.Item("") = 60
objMessage.Configuration.Fields.Item("") = ""
objMessage.Configuration.Fields.Item("") = ""
objMessage.Configuration.Fields.Item("") = "mypassword"



This example uses a gmail account to send the message, you need to replace this with your own gmail username and password settings or your own smtp server.

This script can be used within CX-Supervisor or any other VB Script container.


Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2008-09-11
Modified 2012-08-09
Views 6356


You are not logged in.