App-MonM-Notifier
view release on metacpan or search on metacpan
lib/App/MonM/Notifier.pm view on Meta::CPAN
#print App::MonM::Util::explain($ch);
my $message = App::MonM::Message->new(
to => lvalue($ch, "to"),
cc => lvalue($ch, "cc"),
bcc => lvalue($ch, "bcc"),
from => lvalue($ch, "from"),
subject => $args{subject} // '', # Message subject
body => $args{message} // '', # Message body
headers => hash($ch, "headers"),
contenttype => lvalue($ch, "contenttype"), # optional
charset => lvalue($ch, "charset"), # optional
encoding => lvalue($ch, "encoding"), # optional
attachment => node($ch, "attachment"),
);
# Enqueue
my $newid = $store->enqueue(
to => lvalue($ch, "to") || lvalue($ch, "recipient") || "anonymous",
channel => $ch->{chname},
subject => $args{subject} // '',
message => $args{message} // '',
lib/App/MonM/Notifier.pm view on Meta::CPAN
# Create message
my $message = App::MonM::Message->new(
to => lvalue($ch, "to"),
cc => lvalue($ch, "cc"),
bcc => lvalue($ch, "bcc"),
from => lvalue($ch, "from"),
subject => $entity->{subject},
body => $entity->{message},
headers => hash($ch, "headers"),
contenttype => lvalue($ch, "contenttype"), # optional
charset => lvalue($ch, "charset"), # optional
encoding => lvalue($ch, "encoding"), # optional
attachment => node($ch, "attachment"),
);
# Send message
my $sent = $self->channel->sendmsg($message, $ch);
# ReQueue or DeQueue
if ($sent) { # SENT
$store->dequeue( id => $id );
( run in 0.233 second using v1.01-cache-2.11-cpan-4d50c553e7e )