Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Mail::Queue::DB 0.03

    Download button

    No screenshots available
    Downloads: 302  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    3 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    S. Zachariah Sprackett | More programs
    Perl Artistic License / FREE
    October 17th, 2007, 06:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Mail::Queue::DB description

    Mail::Queue::DB allows to store outgoing email locally in a Berkely DB.

    Mail::Queue::DB allows to store outgoing email locally in a Berkely DB.

    SYNOPSIS

    use Mail::Queue::DB;
    my $d = new Mail::Queue:DB( db_file => '.database');

    print $d->count_queue() . " messages in the queue.n";
    my $msg_id = $d->queue_mail($args, $msg);

    $z->dequeue_mail($msg_id);
    print $d->count_queue() . " messages in the queue.n";

    Mail::Queue::DB allows one to create a local outgoing email store in Berkely DB format. This mail can then be flushed over SSH or some other connection to an appropriate mailhost. This module and the associated tools work well on systems like laptops that need to be able to send mail while offline. It was designed to be complementary to OfflineIMAP.

    METHODS

    new(db_file => $file)

    Creates a new Mail::Queue::DB object. The argument db_file must be defined.

    queue_mail($args, $msg)

    Adds a new message to the queue. Args must contain the arguments required to pass to sendmail to actually send the email. Typically, these arguments will be something like: -oem -oi -- user@example.com

    Msg contains the actual email message to be transmitted.
    On success, the message id of the newly queued email will be returned. On failure, queue_mail() returns undef

    queue_mail($id, $have_lock)

    Deletes a message from the queue. Id must contain a valid message id. dequeue_mail() will attempt to attain a write lock on the database unless the boolean value have_lock is set.

    On success, queue_mail() returns 0. On failure, it returns a negative value.

    get_mail($id)

    Fetches the message identified by Id from the queue. On success, it returns an array of Args, Msg. On failure it returns undef.

    iterate_queue($callback, $locking)

    For each message in the queue, run the passed callback function. Lock state specifies the lock to hold for the entire iteration run. It can be one of either read or write. If not specified, a read lock is assumed.

    The passed in callback will receive arguments in the form callback( $id, $args, $msg )

    count_queue( )

    Returns an integer representing the number of emails currently in the queue.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    store mail | Berkely database | Perl module | Berkely | database | mail

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM