The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mail::SpamAssassin::PerMsgLearner - per-message status (spam or not-spam)

SYNOPSIS

  my $spamtest = new Mail::SpamAssassin ({
    'rules_filename'      => '/etc/spamassassin.rules',
    'userprefs_filename'  => $ENV{HOME}.'/.spamassassin.cf'
  });
  my $mail = Mail::SpamAssassin::NoMailAudit->new();

  my $status = $spamtest->learn ($mail);
  ...

DESCRIPTION

The Mail::SpamAssassin learn() method returns an object of this class. This object encapsulates all the per-message state for the learning process.

METHODS

$status->learn_spam()

Learn the message as spam.

$status->learn_ham()

Learn the message as ham.

$status->forget()

Forget about a previously-learned message.

$didlearn = $status->did_learn()

Returns 1 if the message was learned from or forgotten succesfully.

$status->finish()

Finish with the object.

SEE ALSO

Mail::SpamAssassin spamassassin