App::MonM::Notifier - extension for the monm notifications
Version 1.04
use App::MonM::QNotifier;
This is an extension for the monm notifications with guaranteed delivery
my $notifier = App::MonM::Notifier->new( config => $app->configobj, );
$notifier->notify( to => ['@FooGroup, @BarGroup, testuser, foo@example.com, 11231230002'], subject => "Test message", message => "Text of test message", before => sub { my $self = shift; # App::MonM::QNotifier object (this) my $message = shift; # App::MonM::Message object warn ( $self->error ) if $self->error; # ... return 1; }, after => sub { my $self = shift; # App::MonM::QNotifier object (this) my $message = shift; # App::MonM::Message object my $sent = shift; # Status of sending warn ( $self->error ) if $self->error; die ( $self->channel->error ) unless $sent; # ... return 1; }, ) or die($notifier->error);
Sends message (text of message) to recipients list
The callback function "before" calls before the message sending. Must be return the true value. The callback function "after" calls after the message sending. Must be return the true value
Tries to send postponed messages
my $store = $notifier->store();
Returns store object
Example of configuration section:
UseMonotifier yes <MoNotifier> File /tmp/monotifier.db Expires 1h MaxTime 1m </MoNotifier>
See Changes file
Changes
App::MonM::QNotifier
See TODO file
TODO
* none noted
Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved
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/
LICENSE
To install App::MonM::Notifier, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::MonM::Notifier
CPAN shell
perl -MCPAN -e shell install App::MonM::Notifier
For more information on module installation, please visit the detailed CPAN module installation guide.