Get or Set the message engine of the event configurations.
When event source is triggered, the device could send the pre-configured notification message to the SMTP mail server or the HTTP CGI program.
To send the message to the SMTP mail server, the SMTP mail server configurations have to be set first. Refer to the URL SMTP_PRI and SMTP_SEC for further information.
There are two parts in the URL when the message was uploaded to the remote HTTP CGIs by this command. The first part is the CGI program including the path and user defined URL commands which could be ignored. The second part is the message. The name of the message is "Message". Here are examples of the URL sending to the remote HTTP server
Assume the HTTP CGI is /cgi-bin/MyCgi.cgi and the message is "This is a test message." The URL to the remote HTTP server should be
/cgi-bin/MyCgi.cgi?Message=This+is+a+test+message.Assume the HTTP CGI is /cgi-bin/MyCgi.cgi and the user defined URLs are CMD1=abc&CMD2=def. The message is "This is a test message." The URL to the remote HTTP server should be
/cgi-bin/MyCgi.cgi?CMD1=abc&CMD2=def&Message=This+is+a+test+message.
type,HostCgi,[SubjectUrl],msg
type: the method of sending message.
value in type description 0 no message will be sent. disable this function 1 send the message to SMTP server 2 send the message to the HTTP CGI Program 1 3 send the message to the HTTP CGI Program 2 HostCgi: The destination host for this message. It depends on the value in type argument. The maximum length is 63.
value in type definition of HostCgi 0 no used. 1 The receipt email address. The ';" was used to connect several email addresses. 2 CGI program path for HTTP server 1. The URL command could be appended to the CGI program. The space character is not allowed. 3 CGI program path for HTTP server 1. The URL command could be appended to the CGI program. The space character is not allowed. SubjectUrl: The subject of the message. It depends on the value in the type argument. The character in the subject has to follow RFC 3986 Uniform Resource Identifier Generic Syntax. The maximum length is 31 not including the left/right brackets.
If the length of the input argument is longer than its maximum length limitation, the error message will be returned.
The '['and ']' are NOT allowed in SubjectUrl.
value in type definition of SubjectUrl 0 no used. 1 The subject in the email Title 2 User defined URL Commands. This could be empty (no command). When there are URL commands, they have to be enclosed in the brackets, []. 3 User defined URL Commands. This could be empty (no command). When there are URL commands, they have to be enclosed in the brackets, []. Special Note
Most of cases, the '&' is used to connect two commands. Therefore, the '&' is the part of SubjectUrl input arguments. In this case, two different meaning of '&' in this URL command. It will confuse the encoder device when it parsers this URL command. To solve this problem, the %26, the ASCII code of '&', has to be used when '&' acts as the input argument.
For example,
EVENT_RSPMSG1=2,/cgi-bin/MyCgi.cgi,[CMD1=abc%26CMD2=def],Here is my message
The %26 is the conjunction symbol to connect two URLs, CMD1=abc and CMD2=def.
Please refer to the Example to have clear usage of this type of URLs.message: The content of the message. The character in the message has to follow RFC 3986 Uniform Resource Identifier Generic.
HTTP message
the space character is allowed and will be transfer to '+' when the message is uploaded. The maximum length is 151. And the Message URL command is used to carry this notification message.
For example, the message argument is "motion region 1 was triggered". This message will be composed to
Message=motion+region+1+was+triggered.If the length of the input argument is longer than its maximum length limitation, the error message will be returned.
EVENT_RSPMSGn='1,myname@mail.com,MySubject,Here is my message.'
or
EVENT_RSPMSGn='2,/cgi-bin/MyCgi.cgi,[CMD1=abc&CMD2=def],Here is my message.'
OK: EVENT_RSPMSGn='1,myname@mail.com,MySubject,Here is my message.'
or
OK: EVENT_RSPMSGn='2,/cgi-bin/MyCgi.cgi,,Here is my message without extra URLs.'
or
ERROR: EVENT_RSPMSGn='1,myname@mail.com,MySubject,Here is my message.'where n could be 1, 2 or 3
Valid
EVENT_CONFIG, EVENT_RSPDOn, EVENT_IMGn, EVENT_RSPCMDn, EVENT_RSPGO, SMTP_PRI, SMTP_SEC, HTTP_SERVER
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_RSPMSGn
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPMSGn
http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_RSPMSGn=1,myname@mail.com,subject,message.
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPMSGn=1,myname@mail.com,subject,message.
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPMSGn=2,/cgi-bin/MyCgi.cgi,[CMD1=abc%26CMD2=def],Here is my message with extra URLs.
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPMSGn=2,/cgi-bin/MyCgi.cgi,,Here is my message without extra URLs.
where n could be 1, 2 or 3