What I had before was actualy eroneous so in the interests of being complete

 my $check_mail = message_from_string_or_arrayref($mail->as_string);

my $msg = Mail::SpamAssassin::PerMsgStatus->new($spamtest, $check_mail);

  if ($msg->check_for_faraway_charset_in_headers())
  {
    ignore_mail($mail);
  } elsif ($msg->html_charset_faraway())
  {
    ignore_mail($mail);
  } elsif ($msg->check_for_mime(undef, 'mime_faraway_charset'))
  {
    ignore_mail($mail);
} elsif ($msg->check_for_faraway_charset($msg- >get_decoded_stripped_body_text_array(
)))
  {
    ignore_mail($mail);
  }


On Feb 10, 2007, at 6:50 PM, Theo Van Dinter wrote:

On Sat, Feb 10, 2007 at 06:30:50PM -0600, Robert Nicholson wrote:
I'd like to programatically call the methods SA uses to check for
8bit charsets and the like but I personally do not care to make use
of the rules engine at all. Do I need an instance of PerMsgStatus
fully setup before I can call eval: methods programatically?

Generally speaking, yes.

I'm looking to call things like check_for_faraway_charset,
check_for_faraway_charset_in_headers

If you look at the code, those functions clearly want a PMS object.

--
Randomly Selected Tagline:
Check book: a book with a unhappy ending.

Reply via email to