Sendmail with onchange

@anonqaskigyf
Hi Christian,

I will follow up this post with an example script from Zach and a link to another example.

Deryck

Hi Christian,

Here is an example Zach wrote for you.

Rem --- eWON start section: Cyclic Section
eWON_cyclic_section:
Rem --- eWON user (start)
Rem --- eWON user (end)
End
Rem --- eWON end section: Cyclic Section
Rem --- eWON start section: Init Section
eWON_init_section:
Rem --- eWON user (start)
ONALARM "TagTest","GOTO ProcessTagTestAlarm"
Rem --- eWON user (end)
End
Rem --- eWON end section: Init Section
Rem --- eWON start section: User Section
Rem --- eWON user (start)
ProcessTagTestAlarm:
    A% = ALSTAT("TagTest")
    PRINT Time$;" TagTest alarm ";A%
    IF (A%=2) THEN
        Rem Send eMail only when the alarm occurs
        N$ = CHR$(10)+CHR$(13) : Rem CRLF
        A$ = "This is my customised alarm eMail for tag TagTest" + N$
        A$ = A$ + "The current value of TagTest is " + STR$(TagTest@) + N$
        A$ = A$ + "The current time is " + TIME$
        SENDMAIL "support@hms.how ","","TagTest alarm Subject",A$
    ENDIF
END

Here is another example we have posted too. eWON Flexy Alarm Tag Values & Global E-mail Recipients

Hi Guys!

Hey bud I was wondering if you guys could help me out. I use the Ewon Flexy 205 to send SMS Text for various alerts. One of the Alerts that I send out is a Production alert to the owner of our company.

He asked if the format to the text could be changed to send the alert value in the 1st line of the SMS Text. See attached picture. Like most bosses he doesn’t want to search for the value.

Essentially the other text is irrelevant to what he would like to see.

If there was a way to send the value in the SUBJ: line or earlier in the message that would work. See the circled info.

I would really appreciate any help you can give me!

Thanks Guys!

Thank you!

Christian

Hi Christian,

I have been testing and have not found a way of getting the value above the subject line using the Basic IDE. You can do a custom template for sms and email, but this will override the default template and have all emails and SmS sent out formatted the same way.

Here is a document on the formatting and at the bottom of it a list of configurable fields.