Hello all,
I wonder, is there any way sending email in the script of tags? I looked the manual and some topics, almost all of them related to gateway or another section in the ignition. I couldn’t find out any example inside the tags scripts.
For example;
I have a memory tag as above and it has some script codes for get data from MES system. It’s working for now, but I have some if&else condition into this script of tag and I want to send email if run my “else” condition and give detail information about process.
Is it possible this? Can I manage this directly over memory tag?
Edit:
When I try this script in the console, I get error as following.
body = "Hello, this is an email."
recipients = ["test1@gmail.com"]
system.net.sendEmail("mail.mycompany.com",
"myemail@mycompany.com", "Here is the email!", body, 0, recipients)```
Output
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error sending email. Session id=BB58AF7B
Thanks