Notify::Email - Implements a transport object in accordance with interface defined in Notify::NoticePool.
use Notify::Email my $transport = new Notify::Email ({ 'app' => "Application name", 'mbox' => "Path to unix mail box", 'smtp' => "smtp@domain.com", }); my $notice = new Notify::Notice; $transport->send ($notice); my $response = $transport->receive ($notice);
This module implements the transport object interface as defined in Notify::NoticePool for communication over email. Mail delivery is done via SMTP and mail reception is done via unix-style mailbox.
None.
new ($hashref) The email transport object takes a hashref that supports the following keys: Required: 'app' - The name of the calling application. Used in constructing the notification subject. Optional: 'smtp' - The SMTP server to use for outgoing mail. Defaults to localhost. 'mbox' - The unix-style mailbox to use for receiving mail. Defaults to /var/spool/mail/`whoami`. send ($notice) Attempts to send an email to the 'dest' attribute of the notification object. Returns 1 on success or undef. recieve ($notice) Attempts to receive a response for a notification object. Returns the body of the response email or undef if not successful.
Michael Gilfix <mgilfix@eecs.tufts.edu> Copyright (C) 2001
perl (1), Notify::Notice, Notify::NoticePool
This software is currently alpha, version 0.0.1.
To install Notify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Notify
CPAN shell
perl -MCPAN -e shell install Notify
For more information on module installation, please visit the detailed CPAN module installation guide.