18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

optStrSMTPPassword<br />

By default, SMTP servers do not require authentication for outgoing email. If your server does<br />

require authentication, set optNumAuthType to 1 (unencrypted) or 2 (encrypted via TLS/<br />

SSL), and then specify the username and password. (If your SMTP username and password<br />

are the same as your POP3 username and password, then you can skip optStrSMTPUser<br />

and optStrSMTPPassword. The project will automatically use the values from strUser and<br />

strPassword.)<br />

Note: Encryption via TLS/SSL is not supported in projects running on Windows<br />

Embedded target systems.<br />

Returned value<br />

Value<br />

Description<br />

0 Success<br />

1 Invalid format for strSMTP<br />

2 Invalid format for strFrom<br />

3 Invalid format for strPOP3<br />

4 Invalid format for strUser<br />

5 Invalid format for strPassword<br />

6 Invalid format for optNumTimeout<br />

7 Wrong number of parameters<br />

8 Error getting host IP address (invalid POP3 server)<br />

9 Error connecting to POP3 server<br />

10 Error sending username<br />

11 Error sending password<br />

12 SMTP server does not support selected authentication mode<br />

13 Invalid SMTP username<br />

14 Authentication failed<br />

Notes<br />

The email configuration created by this function works only within the Windows process where the function<br />

was called.<br />

For example, if you place a Button object in a screen and then set the object to call this function when it is<br />

pressed, the resulting email configuration will work only on the Client station where the screen is displayed<br />

and the button is pressed. It will not work on any other Client stations nor on the Server station, because the<br />

project viewer running on the Client station only exchanges data (i.e., changes in tag values) with the data<br />

server running on the Server station. One cannot directly call functions on the other; it can only use triggers<br />

to force the other to call functions. Please note that is true even when the Client station and the Server station<br />

are the same physical device, because the project viewer and the data server are two separate processes in<br />

Windows.<br />

If you want an email configuration to apply to your project's background tasks — for example, to be able to<br />

send emails when alarms become active — then you must either use the E-mail Settings dialog to configure<br />

default settings for the entire project OR call this function in some place like the project's Startup Script, a<br />

Script Group, or a Math worksheet.<br />

<strong>InduSoft</strong> Web Studio Page 707

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!