Send Email

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Send Email

Postby jjimeneznieves » Wed 12. Jun 2013 18:10:40

Hello!

My name's Jaime.

I have the next question:

Is it possible to send E-mail when a alarm event is generated?

Thank you very much.
jjimeneznieves
 
Posts: 5
Joined: Tue 16. Apr 2013 19:24:00

Re: Send Email

Postby Tomáš Bräuer » Fri 14. Jun 2013 11:24:49

Hi Jaime!

1) Write a script into an event PmAlarmEvent.onStateChange. Whenever a state of an alarm is changed, an event PmAlarmEvent.onStateChange is invoked. You need to test parametr pEvent.Action for a 0 value (alarm activation). In parameter pEvent.Item you will have reference to an activated alarm so that you can read all the needed information from it. That's the way how to invoke script whenever any alarm is activated.

2) The script for sending an email is in promotic documentation see http://www.promotic.eu/en/pmdoc/EditorA ... ail_01.htm

Of course you can make a global method from that script, so that you can send an email from any script in promotic by invoking the global method (something like Pm.Methods.SendMyEmail)
Tomáš Bräuer
Administrátor
 
Posts: 165
Joined: Thu 13. Dec 2012 9:13:13


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 6 guests

cron