Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page Next page


You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The MAIL_MESSAGE object corresponds to the Mail message system object.

The MAIL_MESSAGE object sends events presented in the table.  Procedure is started when the corresponding event appears.

OnEvent("MAIL_MESSAGE","_id_","_event_")

Event

Description

“SEND_ERROR”

Error of message sending.

“SENT”

Message is sent.

Format of operator to describe actions with mail message is following:

DoReact("MAIL_MESSAGE","_id_","_command_" [,"_parameters_"]);

List of commands and parameters for the MAIL_MESSAGE object is given in the table:

Commandcommand description

Parameters

Description

"SETUP" – settings for mail message.

from<>

Source address.

to<>

Destination address.

cc<>

Copies.

subject<>

Message subject.

body<>

Message body.

attachments<>

Attachments. If several files are attached, their addresses are semicolon separated.

flags<>

Flags.

name<>

Object name.

pack<>

Way of attachments packing.

is_body_html<>Specifies if HTML markup is to be applied when sending. Possible values: 1 or 0.

inline<>

Specifies if attachments are only shown in the message text text (value of 1) or both in text and "Attachments" section (value of 0).

"SEND" – send mail message.

-

-

"SEND_RAW" – send e-mail with parameterssame as for SETUPsee Examples of scripts in JScript language


Properties of the MAIL_MESSAGE object are shown in the table.

Properties of the MAIL_MESSAGE object

Description

ID<>

Object ID.

PARENT_ID<>

Parent object ID.


Example of using reactions of the MAIL_MESSAGE object.

  1. Send message with image from video camera when it switches to alarm state while motion detection triggering.

    OnInit(){
      i=0; //counter is used to avoid overwriting of images from one camera
    }
     
    OnEvent("CAM",N,"REC") //video camera is in alarm state 
     
    {
      filename = "c:\" + N + "_msg_"+str(i)+".jpg";
      i=i+1;
      DoReact("MONITOR","1","EXPORT_FRAME","cam<"+ N + ">,file<" + filename+ ">");
      DoReact("MAIL_MESSAGE", "1", "SETUP", "body<camera is triggered"+ N + ">, subject<alarm by camera>, from<john.smith@AxxonSoft.com>, to<mary.foreman@AxxonSoft.com>,attachments<" + filename + ">");
      DoReact("MAIL_MESSAGE","1","SEND");
    }


  • No labels