logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

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

       $didlearn = $status->did_learn()
           Returns 1 if the message was learned from or forgotten successfully.

       $status->finish()
           Finish with the object.

Name

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

See Also

Mail::SpamAssassin(3) spamassassin(1)

perl v5.40.1                                       2025-06-26             Mail::SpamAssassin::PerMsgLearner(3pm)

Synopsis

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

         my $status = $spamtest->learn($mail,$id,$isspam,$forget);
         my $didlearn = $status->did_learn();
         $status->finish();

See Also