Running
Running i!-EquipmentMonitor
Very little work is required to add
Sending Email
To support sending email, first include the
#INCLUDE | // Include to send email |
Next, make sure that the default IP local port used by
dvSmtpSocket = 0:3:0
Next, you need to initialize the SMPT server value by calling SmptSetServer(). You need the name or IP address of your local SMPT server, which you can obtain from you Network administrator. Using a name for the server is acceptable if you have DNS properly configured on the NetLinx Master. Otherwise, you need an IP address. Make sure to use the SMPT server value here. Often, the "email server" refers to the POP3 server; most likely, this is not what you need. Once you have the correct SMPT server name or address, call SmptSetServer() like this:
SmtpSetServer('smtpserver.mydomain.com')
or
SmtpSetServer('192.168.12.175')
If the SMTP email server requires user authentication to send email, you must configure i!- EquipmentMonitor with the username and password of a valid account registered to the SMTP server. You can do this by calling the SmtpSetUser() function. This line is typically included immediately after the SmtpSetServer() initialization command function. An example is provided below:
SmtpSetUser('user1','password') // include only if you need SMTP authentication
If the SMTP email server allows anonymous access and does not require authentication, you simply comment out the previous SmtpSetUser() function call. Without an SMTP username and password configured,
3 |
| |
|
|
|