EXAMPLE 1

Upon receipt of an email message from an active user having subject S1, exactly and only S1 activate output 1 and send a confirmation message.


EME EMAIL FROM USER 

$S10=S1 LAST EMAIL SUBJECT = S1 





out1=1

AT#EMAIL=$S08,"Output 1 on"




trigger event is the receipt of an email message from an active user.

The first condition to check is that the subject of the received message is equal (exactly) to S1.

The first action contains the command that activates output 1.

The second action contains the command that sends the text "Output 1 on" to the sender of the last email message (S08).

EXAMPLE 2

Upon receipt of an email message from an active user with subject containing the text R1, deactivate output 1 and send a confirmation email message.


EME EMAIL FROM USER  

$S10(R1 LAST EMAIL SUBJECT ( R1 





out1=0

AT#EMAIL=$S08,"Uscita 1 spenta"




trigger event is the receipt of an email message from an active user.

The first condition to check is that the subject of the message received contains (also) the text R1.

The first action contains the command that turns output 1 off.

The second action contains the command that sends the text "Output 1 off" to the sender of the last email message (S08).

EXAMPLE 3

Upon receipt of an email message from an unknown user, append a line containing the date, time and number of the sender on a file in the LOGS folder of the SD card and inform that it is not authorized to control the device.


EMU EMAIL FROM UNKNOWN 

 





AT#AFILE=S:LOGS/log.txt,T,"$D14 $D15 : $S08"

AT#EMAIL=$S08,"You are not authorized user of $D01"




trigger event is the receipt of an email message from unknown.

The first action contains the command that appends to the log.txt file in the LOGS folder of the S: unit (SD card) a new line:
TAG $D14 which is the current day
TAG $D15 which is the current time
TAG $S08 or email address of the last sender
The contents of the file will be something like this:
210308 121014 : mark@home.com
210328 162044 : george@work.com

The second action contains the command that sends the text "You are not authorized user" followed by the device name (D01) to the sender of the last email message (S08).