Appendix: Built-in Scripting Language Returned value Notes The email configuration created by this function works only within the Windows process where the function was called. For example, if you place a Button object in a screen and then set the object to call this function when it is pressed, then the resulting email configuration will work only on the Client station where the screen is displayed and the button is pressed. It will not work on any other Client stations nor on the Server station, because the project viewer running on the Client station only exchanges data (i.e., changes in tag values) with the data server running on the Server station.
One cannot directly call functions on the other; it can only use triggers to force the other to call functions. Please note that is true even when the Client station and the Server station are the same physical device, because the project viewer and the data server are still two separate processes in Windows. If you want an email configuration to apply to your project's Background Task — for example, to be able to send emails when alarms become active — then you must call this function in some place like the project's Startup Script , a Script Group , or a Math worksheet .
Examples CnfEmail( "smtp.company.com", "Robert@company.com", "pop.company.com", "RobertH", "Shades556", 100 ) CnfEmail( "smtp.company.com:4455", "Robert@company.com", "pop.company.com:9900", "RobertH", "Shades556", 5, 1 ) CnfEmail( "195.11.22.33:4455", "Robert@company.com", "195.66.77.88:9900", "RobertH", "Shades556", 5, 1, "JohnS", "abcd1234" ) GetStatusSendEmailExt Returns status of the last email sent using the SendEmailExt function.
Syntax GetStatusSendEmailExt( { | optTagName } ) optTagName Page 594 InduSoft Web Studio Value Description 0 Success 1 Invalid format for strSMTP 2 Invalid format for strFrom 3 Invalid format for strPOP3 4 Invalid format for strUser 5 Invalid format for strPassword 6 Invalid format for optNumTimeout 7 Wrong number of parameters 8 Error getting host IP address (invalid POP3 server) 9 Error connecting to POP3 server 10 Error sending username 11 Error sending password 12 SMTP server does not support selected authentication mode 13 Invalid SMTP username 14 Authentication failed Function Group Execution Windows Embedded Thin Client GetStatusSend EmEamiaillExt Synchronous Supported Supported Supported