The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::MonM::Channel::Command - MonM command channel

VERSION

Version 1.00

SYNOPSIS

<Channel MyCommand>

    Type    Command
    Enable  on

    # Real To id/address/name
    # To 14242545300
    # To +1-424-254-5300
    To      testusername

    # Schedule
    #At Sun-Sat[00:00-23:59]

    # MIME options
    #Encoding 8bit
    #    8bit, quoted-printable, 7bit, base64
    #ContentType text/plain
    #Charset utf-8

    # Command mask
    #Command curl -d "[MESSAGE]" "https://sms.com/?[MSISDN]"
    Command "echo "[NUMBER]; [SUBJECT]; [MESSAGE]" >> /tmp/fakesms.txt"

    # Schedule
    #At Sun-Sat[00:00-23:59]

    # Command Options
    Content body
    Timeout 20s

</Channel>

DESCRIPTION

This module provides command method that send the content of the message to an external program

sendmsg

For internal use only!

CONFIGURATION DIRECTIVES

The basic Channel configuration options (directives) detailed describes in "CONFIGURATION DIRECTIVES" in App::MonM::Channel

Command

Defines full path to external program or mask of command

Default: none

Available variables:

[ID] -- Internal ID of the message
[TO] -- The real "to" field of message
[RCPT], [RECIPIENT] -- Recipient (name, account, id, number and etc.)
[PHONE], [NUM], [TEL], [NUMBER], [MSISDN] -- Recipient too
[TIME] -- Current time (in unix time format)
[DATETIME] -- date and time in short-format (YYYMMDDHHMMSS)
[DATE] -- Date in short-format (YYYMMDD)
[SUBJECT], [SUBJ], [SBJ] -- Subject of message
[MESSAGE], [MSG] -- The Subject too (! no real message content)

Note! The real message content body sends to STDIN of command

From

Sender address email (optional)

Content
Content email

Sets the whole MIME message as content for command STDIN

Content body

Sets the body of message as content for command STDIN

Content none

Suppress sending content to command STDIN (no content - no problems)

Default: body

To

Recipient address (email) or name

Timeout
Timeout 20s

Sets timeout for command running

Timeout off
Timeout 0

Disable timeout

Default: 20 sec

See also description of format for the timeout values "getTimeOffset" in App::MonM::Util

Type
Type    Command

Required directive!

Defines type of channel. MUST BE set to "Command" value

About common directives see "CONFIGURATION DIRECTIVES" in App::MonM::Channel

HISTORY

See Changes file

TO DO

See TODO file

AUTHOR

Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See LICENSE file and https://dev.perl.org/licenses/