WWW::Spamla - interface to Spam.la


WWW-Spamla documentation  | view source Contained in the WWW-Spamla distribution.

Index


NAME

Top

WWW::Spamla - interface to Spam.la

SYNOPSIS

Top

    my $la = WWW::Spamla->new;

    my @list = $la->list( address => 'bubba' );

    for my $item (@list) {
        printf "%d: %s - %s\n", $item->id, $item->from, $item->subject;

        if ( $subject =~ /account/ ) {
            my $msg = $la->message( $item->id );
            my $parsed = Email::MIME->new( $msg );
            # ...
        }
    }

DESCRIPTION

Top

The WWW::Spamla module provides an interface to the Spam.la website.

METHODS

Top

$la = WWW::Spamla->new
$la = WWW::Spamla->new( ua => $ua )

Creates a new WWW::Spamla object. The constructor accepts an optional LWP::UserAgent derived object.

@list = $la->list
@list = $la->list( address => $address, start_id => $id )

Returns a list of the 20 latest messages. The list can optionally be started from a specific id, and filtered by address. Returns undef if an error occurred. The return list consists of objects of type WWW::Spam::ListItem, which provide accessors to data id, to, from, subject.

@message = $la->message( $id )

Given a message id, fetches and returns the corresponding MIME message. It can then be parsed by any MIME handler, like Email::MIME or MIME::Parser. Returns undef if an error occurred.

$error = $la->error

Returns the error, if one occurred.

SEE ALSO

Top

http://spam.la/

REQUESTS AND BUGS

Top

Please report any bugs or feature requests to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Spamla. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc WWW::Spamla

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/WWW-Spamla

* CPAN Ratings

http://cpanratings.perl.org/d/WWW-Spamla

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Spamla

* Search CPAN

http://search.cpan.org/dist/WWW-Spamla

COPYRIGHT AND LICENSE

Top

AUTHOR

Top

gray, <gray at cpan.org>


WWW-Spamla documentation  | view source Contained in the WWW-Spamla distribution.