27.11.2017, 10:35
For event value you can use an event script:
For storage value you need a scheduled script. But, if you want to send a value on each storage value change you should use a virtual object instead because you cannot attach an event script to storage changes.
Code:
value = event.getvalue()
subject = 'E-mail test'
message = 'Event value is ' .. tostring(value)
mail('user@example.com', subject, message)
For storage value you need a scheduled script. But, if you want to send a value on each storage value change you should use a virtual object instead because you cannot attach an event script to storage changes.
Code:
value = storage.get('myvalue')
subject = 'E-mail test'
message = 'Storage value is ' .. tostring(value)
mail('user@example.com', subject, message)