Mail::SpamAssassin::PerMsgLearner - per-message status (spam or not-spam)
my $spamtest = new Mail::SpamAssassin ({ '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();
The Mail::SpamAssassin learn() method returns an object of this class. This object encapsulates all the per-message state for the learning process.
learn()
Returns 1 if the message was learned from or forgotten successfully.
1
Finish with the object.
Mail::SpamAssassin spamassassin
Mail::SpamAssassin
spamassassin
To install Mail::SpamAssassin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::SpamAssassin
CPAN shell
perl -MCPAN -e shell install Mail::SpamAssassin
For more information on module installation, please visit the detailed CPAN module installation guide.