NAME
WWW::Mailinator - Perl extension for grabbing messages from mailinator.net
DESCRIPTION
WWW::Mailinator accesses 'your' mailinator.net mailbox and downloads the message(s).
SYNOPSIS
use WWW::Mailinator;
my $mailbox = WWW::Mailinator->new();
$mailbox->login('b10m');
if($mailbox->count) {
foreach my $email ($mailbox->messages) {
print $email->{from}.": ".$email->{subject}."\n";
print $mailbox->retrieve($email->{num})."\n\n";
}
METHODS
new
new creates a new WWW::Mailinator object. It takes no options.
login
login seems like a strange word for this action, for there is no password needed. Yet in spite of a better name, here it is. The only thing required is a username of the mailbox you want to check.
After 'logging in', you can access the count, messages, and retrieve routines.
count
count will return the amount of messages found for the user that logged in.
messages
messages returns an array of all the messages found, except for the body of the email. From, Subject, URL, and Num(ber) can be accessed.
$mailbox->login('dude');
foreach my $email ($mailbox->messages) {
printf("%03i <%s>: %s\n\t%s\n\n", $email->{num}, $email->{from},
$email->{subject}, $email->{url});
}
retrieve
retrieve takes one argument, the mail number, and returns the corresponding email.
SEE ALSO
LWP::Simple, HTML::TableExtract, http://www.mailinator.net/
AUTHOR
M. Blom, <b10m@perlmonk.org>
COPYRIGHT AND LICENSE
Copyright (C) 2004 by M. Blom
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.